From c32cab9ee03915390a5b175a4f3234aebc87b73a Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Fri, 11 Mar 2022 04:47:41 +0100 Subject: [PATCH] Fix "time" to only contain reasonable values When a song longer than 24 minutes is in the playlist, the time attribute of the INI is not parseable, causing a crash of the app. --- utils/playlist2ini.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/playlist2ini.sh b/utils/playlist2ini.sh index 82ef77c..8046b1f 100755 --- a/utils/playlist2ini.sh +++ b/utils/playlist2ini.sh @@ -7,10 +7,11 @@ set -euo pipefail # Use at own risk :-) -mpc -f '[[%artist% - ]%title%]#|%file%#|%time%' playlist | while IFS='|' read title file time; do +mpc -f '[[%artist% - ]%title%]#|%file%' playlist | while IFS='|' read title file; do if test -z "$title"; then title="$(basename "$file")" fi - echo -e "[$title]\npath = $file\ntime = $time\n" + # Unfortunately, the "time" attribute is currently required + echo -e "[$title]\npath = $file\ntime = 2:00\n" done