aboutsummaryrefslogtreecommitdiff
path: root/local
diff options
context:
space:
mode:
Diffstat (limited to 'local')
-rwxr-xr-xlocal/mpd_playlist.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/local/mpd_playlist.sh b/local/mpd_playlist.sh
index 96b1df4..a82b961 100755
--- a/local/mpd_playlist.sh
+++ b/local/mpd_playlist.sh
@@ -11,6 +11,11 @@ update_playlist () {
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"
+case $(mpc status "%state%") in
+ stopped|paused)
+ 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"
+ ;;
+ *)
+esac