encrypt 7 سال پیش
والد
کامیت
db9e6b6d04
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      utils/radio-autofeed.sh

+ 1 - 1
utils/radio-autofeed.sh

@@ -3,7 +3,7 @@
 PLAYLIST="~/radio-playlist"
 songs_in_playlist=$(mpc | head -n 2 | tail -n 1 | cut -d / -f 2 | cut -d ' ' -f 1)
 
-if [[ $songs_in_playlist -le 3 ]]
+if [[ $(mpc | wc -l) -le 1 || $songs_in_playlist -le 3 ]]
 then
     for song in $(cat $PLAYLIST | shuf | head -n 3)
     do