mirror of
https://github.com/KrumpetPirate/AAXtoMP3.git
synced 2024-11-17 18:58:58 +01:00
commit
c6e8a06f10
4
AAXtoMP3
4
AAXtoMP3
@ -518,9 +518,9 @@ save_metadata() {
|
|||||||
# we use some characters (#) as placeholder, add some new lines,
|
# we use some characters (#) as placeholder, add some new lines,
|
||||||
# put a ',' after the start value, we calculate the end of each chapter
|
# put a ',' after the start value, we calculate the end of each chapter
|
||||||
# as start+length, and we convert (divide) the time stamps from ms to s.
|
# as start+length, and we convert (divide) the time stamps from ms to s.
|
||||||
# Then we delete all ':' since they make a filename invalid.
|
# Then we delete all ':' and '/' since they make a filename invalid.
|
||||||
jq -r '.content_metadata.chapter_info.chapters[] | "Chapter # start: \(.start_offset_ms/1000), end: \((.start_offset_ms+.length_ms)/1000) \n#\n# Title: \(.title)"' "${extra_chapter_file}" \
|
jq -r '.content_metadata.chapter_info.chapters[] | "Chapter # start: \(.start_offset_ms/1000), end: \((.start_offset_ms+.length_ms)/1000) \n#\n# Title: \(.title)"' "${extra_chapter_file}" \
|
||||||
| tr -d ':' >> "$metadata_file"
|
| $SED 's@[:/]@@g' >> "$metadata_file"
|
||||||
# In case we want to use a single file m4b we need to extract the
|
# In case we want to use a single file m4b we need to extract the
|
||||||
# chapter titles from the .json generated by audible–cli and store
|
# chapter titles from the .json generated by audible–cli and store
|
||||||
# them correctly formatted for mp4chaps in a chapter.txt
|
# them correctly formatted for mp4chaps in a chapter.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user