Browse Source

fzmp: fix for overwriting playlist

pull/17/head
DanielFGray 1 year ago
parent
commit
801fefb066
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      fzmp

+ 5
- 1
fzmp View File

@@ -340,7 +340,11 @@ save_playlist() {
if [[ $playlists = *"$name"* ]]; then
diff -s --suppress-common-lines --color=always --label="$name" --label='playlist' <(mpc playlist -f '%file%' "$name") <(mpc playlist -f '%file%')
read -r -n 1 -p 'Are you sure you want to overwrite this playlist? (press y) ' confirm || return
[[ ${confirm} = y ]] || return 1
if [[ ${confirm,} = y ]]; then
mpc rm "$name"
else
return
fi
fi
mpc save "$name"
}

Loading…
Cancel
Save