aboutsummaryrefslogtreecommitdiff
path: root/local
diff options
context:
space:
mode:
Diffstat (limited to 'local')
-rwxr-xr-xlocal/mpd_playlist.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/local/mpd_playlist.sh b/local/mpd_playlist.sh
new file mode 100755
index 0000000..96b1df4
--- /dev/null
+++ b/local/mpd_playlist.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Update the mpd playlist from RSS fields
+
+playlist_directory="/home/playlists"
+
+update_playlist () {
+ mpc clear
+ mpc load $2
+ echo "#EXTM3U" > "${playlist_directory}/Podcast - $1.m3u"
+ mpc -f "##EXTINF:0,%title%\n%file%" playlist >> "${playlist_directory}/Podcast - $1.m3u"
+ mpc clear
+}
+
+update_playlist "Transe fip Express" "https://radiofrance-podcast.net/podcast09/rss_23649.xml"
+update_playlist "Fip Tape" "https://radiofrance-podcast.net/podcast09/rss_24684.xml"
+update_playlist "Live à Fip" "https://radiofrance-podcast.net/podcast09/rss_13416.xml"