Last active
December 26, 2015 11:19
-
-
Save zeisss/7142809 to your computer and use it in GitHub Desktop.
Updates somafm m3u playlists files in the current folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Create the interested streams by touching: | |
| # $ touch somafm_groovesalad.m3u | |
| # $ touch somafm_covers.m3u | |
| for x in somafm_*.m3u | |
| do | |
| PLAYLIST_FILE=$x | |
| STREAM=$(echo $PLAYLIST_FILE | sed -e 's/^somafm_//' -e 's/\.m3u$//') | |
| echo Checking $STREAM | |
| PLS=`curl -B http://somafm.com/${STREAM}.pls` | |
| echo "$PLS" | \ | |
| grep -E '^File' | \ | |
| sed -e 's/^File[0-9]*=//' \ | |
| > $PLAYLIST_FILE | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment