mirror of
https://github.com/KrumpetPirate/AAXtoMP3.git
synced 2024-11-18 03:08:57 +01:00
Apply suggestions from code review
Remove padding for chapter number Co-authored-by: fabh2o <fabrice.h2o@gmail.com>
This commit is contained in:
parent
aab2045959
commit
e76b5442c1
4
AAXtoMP3
4
AAXtoMP3
@ -527,7 +527,7 @@ save_metadata() {
|
|||||||
to_entries |
|
to_entries |
|
||||||
.[] |
|
.[] |
|
||||||
"CHAPTER\((.key))=\(((.value.start_offset_ms / (1000*60*60)) %24 | floor | pad(2))):\(((.value.start_offset_ms / (1000*60)) %60 | floor | pad(2))):\(((.value.start_offset_ms / 1000) %60 | floor | pad(2))).\((.value.start_offset_ms % 1000 | pad(3)))
|
"CHAPTER\((.key))=\(((.value.start_offset_ms / (1000*60*60)) %24 | floor | pad(2))):\(((.value.start_offset_ms / (1000*60)) %60 | floor | pad(2))):\(((.value.start_offset_ms / 1000) %60 | floor | pad(2))).\((.value.start_offset_ms % 1000 | pad(3)))
|
||||||
CHAPTER\((.key | pad(2)))NAME=\(.value.title)"' "${extra_chapter_file}" > "${tmp_chapter_file}"
|
CHAPTER\((.key))NAME=\(.value.title)"' "${extra_chapter_file}" > "${tmp_chapter_file}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
debug "Metadata file $metadata_file"
|
debug "Metadata file $metadata_file"
|
||||||
@ -907,7 +907,7 @@ do
|
|||||||
if [ "${audibleCli}" == "1" ]; then
|
if [ "${audibleCli}" == "1" ]; then
|
||||||
mv "${tmp_chapter_file}" "${output_directory}/${currentFileNameScheme}.chapters.txt"
|
mv "${tmp_chapter_file}" "${output_directory}/${currentFileNameScheme}.chapters.txt"
|
||||||
else
|
else
|
||||||
ffprobe -i "${aax_file}" -print_format csv -show_chapters 2>/dev/null | awk -F "," '{printf "CHAPTER%02d=%02d:%02d:%02.3f\nCHAPTER%02dNAME=%s\n", NR, $5/60/60, $5/60%60, $5%60, NR, $8}' > "${output_directory}/${currentFileNameScheme}.chapters.txt"
|
ffprobe -i "${aax_file}" -print_format csv -show_chapters 2>/dev/null | awk -F "," '{printf "CHAPTER%d=%02d:%02d:%02.3f\nCHAPTER%dNAME=%s\n", NR, $5/60/60, $5/60%60, $5%60, NR, $8}' > "${output_directory}/${currentFileNameScheme}.chapters.txt"
|
||||||
fi
|
fi
|
||||||
mp4chaps -i "${output_file}"
|
mp4chaps -i "${output_file}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user