From fc118fb485ed6e5db1c820a74497ad83859976df Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 19 Jun 2024 10:04:42 +0200 Subject: Load rss streams in mpd --- local/mpd_playlist.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 local/mpd_playlist.sh (limited to 'local/mpd_playlist.sh') 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" -- cgit v1.2.3