aboutsummaryrefslogtreecommitdiff
path: root/local/mpd_playlist.sh
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2024-06-19 10:10:16 +0200
committerSébastien Dailly <sebastien@dailly.me>2024-06-21 10:42:36 +0200
commit1ce989e2da7d00b825097cd5cf5aec5273a7ba5b (patch)
treee7655d36590af17851c0b337a315e7bf78d2fad3 /local/mpd_playlist.sh
parentfc118fb485ed6e5db1c820a74497ad83859976df (diff)
Do not update the playlist when playingHEADmaster
Diffstat (limited to 'local/mpd_playlist.sh')
-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