From 1ce989e2da7d00b825097cd5cf5aec5273a7ba5b Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 19 Jun 2024 10:10:16 +0200 Subject: Do not update the playlist when playing --- local/mpd_playlist.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'local/mpd_playlist.sh') 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 -- cgit v1.2.3