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 :-) # Use at own risk :-)
mpc -f '[[%artist%] - %title%]#|%file%#|%time%' playlist | while IFS='|' read title file time; do mpc -f '[[%artist% - ]%title%]#|%file%#|%time%' playlist | while IFS='|' read title file time; do
if test -n "$title"; then if test -z "$title"; then
title="$(basename "$title")" title="$(basename "$file")"
fi fi
echo -e "[$title]\npath = $file\ntime = $time\n" echo -e "[$title]\npath = $file\ntime = $time\n"

Loading…
Cancel
Save