From f7c4d0dce8b1561c6efd189ecd18762b6cbef0d2 Mon Sep 17 00:00:00 2001 From: cb1 Date: Wed, 18 Oct 2017 17:55:19 +0200 Subject: [PATCH] Fix chaptercount for 0-padding --- AAXtoMP3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AAXtoMP3 b/AAXtoMP3 index 4369991..4b9c9d0 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -68,7 +68,7 @@ normalize_whitespace() { } chapter_padding() { - chaptercount=$($GREP -Pc "title\s+:\sChapter\s\d+" $metadata_file) + chaptercount=$($GREP -Pc "Chapter.*start.*end" $metadata_file) if [[ $chaptercount -gt 9 && $chaptercount -lt 100 ]] then chapter=$(sed -e 's/Chapter \([[:digit:]]\)$/Chapter 0\1/' <<<$chapter)