fix playlist from file and add more logging

This commit is contained in:
ksyasuda
2021-11-08 17:41:46 -08:00
parent ce362345a4
commit 4b7fccec1c
2 changed files with 27 additions and 6 deletions

View File

@@ -484,9 +484,11 @@ while getopts 'hd:HlpadP:' OPT; do
;;
P)
is_playlist=1
playlist_file="$OPTARG"
[ -z "$playlist_file" ] && die "Eneter in path to playlist"
mpv "$playlist_file"
# remove spaces from $OPTARG
playlist_file="${OPTARG/ //}"
[ -z "$playlist_file" ] && die "Enter in path to playlist"
[ "$VERBOSE" -eq 1 ] && printf "%s\n" "$playlist_file"
$player_fn "$playlist_file"
exit 0
;;
esac