diff --git a/musicplayer.sh b/musicplayer.sh index 85b6e25..79ff82d 100755 --- a/musicplayer.sh +++ b/musicplayer.sh @@ -16,15 +16,14 @@ PLIST="/tmp/playlist" # add album to playlist. for album in $(find $MDIR -type d | $MENU); do - find $album -maxdepth 1 -type f | - grep -E ".mp3|.opus|.flac|.webm|.wav" > $PLIST + if [ -n "$album" ]; then + find $album -maxdepth 1 -type f | + grep -E ".mp3|.opus|.flac|.webm|.wav" > $PLIST + fi done # play it -[ -t 0 ] && mpv --config=no \ - --quiet \ - --vo=tct \ - --lavfi-complex="[aid1]asplit[ao][a1];[a1]showwaves=mode=cline:colors=#$AC:rate=25[vo]" \ +[ -t 0 ] && mpv --no-video \ --playlist=$PLIST \ || mpv --quiet \ --force-window=yes \