Fix bugs in the autogenerating script

master
LEdoian 3 years ago
parent 8df331fa94
commit 6372b3da78

@ -7,9 +7,9 @@ set -euo pipefail
# Use at own risk :-)
mpc -f '[[%artist%] - %title%]#|%file%#|%time%' playlist | while IFS='|' read title file time; do
if test -n "$title"; then
title="$(basename "$title")"
mpc -f '[[%artist% - ]%title%]#|%file%#|%time%' playlist | while IFS='|' read title file time; do
if test -z "$title"; then
title="$(basename "$file")"
fi
echo -e "[$title]\npath = $file\ntime = $time\n"

Loading…
Cancel
Save