From c729e8431166537e95e687d1ffe94e7e64bf2a78 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 1 Aug 2022 17:39:26 -0400 Subject: Update internet playlist generator --- bin/executable_Internet.m3u.sh | 48 +++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 26 deletions(-) mode change 100755 => 100644 bin/executable_Internet.m3u.sh diff --git a/bin/executable_Internet.m3u.sh b/bin/executable_Internet.m3u.sh old mode 100755 new mode 100644 index 6f35d85..9b32d57 --- a/bin/executable_Internet.m3u.sh +++ b/bin/executable_Internet.m3u.sh @@ -1,33 +1,29 @@ #!/bin/sh # -# Updates the internet radio playlist for MPD +# Updates the internet radio playlists for MPD # Best run from a cronjob -RUHIT=$(curl -s http://ruhit.fm/player.htm | grep ruhit_64 \ - | sed -e 's/.*="//g;s/".*//g') +BASE=/var/lib/mpd/playlists/ -cat < /var/lib/mpd/playlists/Internet.m3u +playlist() { + cat< "${BASE}/radio-$1.m3u" #EXTM3U - -#EXTINF:-1,CKGN-FM 89.7 (Kapuskasing) -http://stream03.ustream.ca:80/ckgn128.mp3 - -#EXTINF:-1,CHYK-FM 104.1 (Timmins) -http://rubix.wavestreamer.com:8015/stream/1/ - -#EXTINF:-1,CJFO-FM 94.5 (Ottawa) -http://stream03.ustream.ca:8000/cjfofm128.mp3 - -#EXTINF:-1,CINN-FM 99.1 (Hearst) -http://stream2.statsradio.com:8050/stream - -#EXTINF:-1,CFSF-FM 99.3 (Sturgeon Falls) -http://listenlive.vistaradio.ca/CFSF - -#EXTINF:-1,99.6 Радио Русский Хит -${RUHIT} - -#EXTINF:-1,WYEP 91.3 (Pittsburgh) -https://ais-sa3.cdnstream1.com/2557_128.mp3 - +#EXTINF:-1,$2 +$3 EOF +} + +getstream() { + curl -s $1 | grep '^File1=' | sed -e 's/File1=//g' +} + +playlist "1920s" "1920s Radio Network" "$(getstream 'http://kara.fast-serv.com:8398/listen.pls')" +# playlist "CFSF-FM" "CFSF-FM 99.3 (Sturgeon Falls)" 'http://listenlive.vistaradio.ca/CFSF' +# playlist "CHYK-FM" "CHYK-FM 104.1 (Timmins)" 'http://rubix.wavestreamer.com:8015/stream/1/' +playlist "CINN-FM" "CINN-FM 99.1 (Hearst)" 'http://stream2.statsradio.com:8050/stream' +# playlist "CJFO-FM" "CJFO-FM 94.5 (Ottawa)" 'http://stream03.ustream.ca:8000/cjfofm128.mp3' +playlist "CKGN-FM" "CKGN-FM 89.7 (Kapuskasing)" 'http://stream03.ustream.ca:80/ckgn128.mp3' +playlist "WYEP" "WYEP 91.3 (Pittsburgh)" 'https://ais-sa3.cdnstream1.com/2557_128.mp3' +playlist "WZUM" "WZUM 88.1 (Pittsburgh)" 'http://pubmusic.streamguys1.com/wzum-aac' +playlist "Dismuke" "Radio Dismuke" "$(getstream 'https://early1900s.org/radiodismuke/radiodismuke.pls')" +playlist "russhit" "99.6 Радио Русский Хит" "$(curl -s http://ruhit.fm/player.htm | grep ruhit_64 | sed -e 's/.*="//g;s/".*//g')" -- cgit v1.2.3