[Bug]: Chapter metadata write bug #684

Closed
opened 2026-04-24 23:16:51 +02:00 by adam · 7 comments
Owner

Originally created by @garlik82 on GitHub (Oct 8, 2022).

Describe the issue

Weird chapter bug when embedding metadata after chapter editing.

After editing:
Captura de ecrã 2022-10-08, às 22 45 07

After embedding and rescan:
Captura de ecrã 2022-10-08, às 22 46 05

Steps to reproduce the issue

  1. Edit chapters
  2. Embed metadata
  3. Rescan audiobook folder.

Nothing relevant shows in the logs.

Audiobookshelf version

v2.2.0

How are you running audiobookshelf?

Docker

Originally created by @garlik82 on GitHub (Oct 8, 2022). ### Describe the issue Weird chapter bug when embedding metadata after chapter editing. After editing: <img width="784" alt="Captura de ecrã 2022-10-08, às 22 45 07" src="https://user-images.githubusercontent.com/5408803/194728997-4410256c-d112-4ca3-9453-02f14693936e.png"> After embedding and rescan: <img width="789" alt="Captura de ecrã 2022-10-08, às 22 46 05" src="https://user-images.githubusercontent.com/5408803/194729009-a1a1a346-33f3-47c4-8975-9d894443d855.png"> ### Steps to reproduce the issue 1. Edit chapters 2. Embed metadata 3. Rescan audiobook folder. Nothing relevant shows in the logs. ### Audiobookshelf version v2.2.0 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:16:51 +02:00
adam closed this issue 2026-04-24 23:16:51 +02:00
Author
Owner

@advplyr commented on GitHub (Oct 9, 2022):

I'm not sure why the chapter title would be blank but when testing this I found other issues with multi-track audiobooks. Can you try testing again with v2.2.1?
And noting if you are using m4b/mp3 and single track or multi track.

@advplyr commented on GitHub (Oct 9, 2022): I'm not sure why the chapter title would be blank but when testing this I found other issues with multi-track audiobooks. Can you try testing again with v2.2.1? And noting if you are using m4b/mp3 and single track or multi track.
Author
Owner

@garlik82 commented on GitHub (Oct 9, 2022):

All m4b files single track.

@garlik82 commented on GitHub (Oct 9, 2022): All m4b files single track.
Author
Owner

@garlik82 commented on GitHub (Oct 9, 2022):

Still happening.
Captura de ecrã 2022-10-09, às 06 18 30

Chapter titles get deleted and that chapters timing gets reset to the original value.

Sometimes chapters that get their title deleted assume the timing of the next chapter +1 second.
Captura de ecrã 2022-10-09, às 11 13 18

@garlik82 commented on GitHub (Oct 9, 2022): Still happening. <img width="829" alt="Captura de ecrã 2022-10-09, às 06 18 30" src="https://user-images.githubusercontent.com/5408803/194739397-179ab8eb-4c2a-4ea2-8168-c25c9d16c3a6.png"> Chapter titles get deleted and that chapters timing gets reset to the original value. Sometimes chapters that get their title deleted assume the timing of the next chapter +1 second. <img width="763" alt="Captura de ecrã 2022-10-09, às 11 13 18" src="https://user-images.githubusercontent.com/5408803/194751078-ffe96b8a-9af3-43ad-8449-726e772d086d.png">
Author
Owner

@garlik82 commented on GitHub (Oct 9, 2022):

I think this happens when using Shift Times with negative numbers. Edited One book in three different ways, manually syncing the chapters, adding 1 second with shift time to every chapter and finally subtracting 1 second to every chapter with shift time, and this only happened when subtracting seconds. Will test further after my laptop has charged.

@garlik82 commented on GitHub (Oct 9, 2022): I think this happens when using Shift Times with negative numbers. Edited One book in three different ways, manually syncing the chapters, adding 1 second with shift time to every chapter and finally subtracting 1 second to every chapter with shift time, and this only happened when subtracting seconds. Will test further after my laptop has charged.
Author
Owner

@garlik82 commented on GitHub (Oct 9, 2022):

After dumping the chapter info with tone, I concluded that the chapters are correct, the issue lies with metadata.abs not grabbing the chapters correctly.

tone dump:
Captura de ecrã 2022-10-09, às 12 27 02

metadata.abs:
Captura de ecrã 2022-10-09, às 12 29 05

@garlik82 commented on GitHub (Oct 9, 2022): After dumping the chapter info with tone, I concluded that the chapters are correct, the issue lies with metadata.abs not grabbing the chapters correctly. tone dump: <img width="491" alt="Captura de ecrã 2022-10-09, às 12 27 02" src="https://user-images.githubusercontent.com/5408803/194754460-d9b3d090-1ef9-405e-a7f6-de77f2e2cac9.png"> metadata.abs: <img width="347" alt="Captura de ecrã 2022-10-09, às 12 29 05" src="https://user-images.githubusercontent.com/5408803/194754472-4b24a1da-3245-4df1-a0ec-9fd880e6216a.png">
Author
Owner

@garlik82 commented on GitHub (Oct 12, 2022):

Been embedding metadata and I can’t reproduce this anymore. I noticed that Apple Books can only see the chapters metadata after I run tone -tag —meta-chapters-file manually, but that is probably another issue. If you can’t reproduce this we can probably assume some bad m4b file was causing this. I redownloaded the books that were misbehaving and everything went according to plan.

@garlik82 commented on GitHub (Oct 12, 2022): Been embedding metadata and I can’t reproduce this anymore. I noticed that Apple Books can only see the chapters metadata after I run tone -tag —meta-chapters-file manually, but that is probably another issue. If you can’t reproduce this we can probably assume some bad m4b file was causing this. I redownloaded the books that were misbehaving and everything went according to plan.
Author
Owner

@advplyr commented on GitHub (Oct 12, 2022):

I wasn't able to reproduce it, hopefully just a bad file like you said. Thanks for following up.

@advplyr commented on GitHub (Oct 12, 2022): I wasn't able to reproduce it, hopefully just a bad file like you said. Thanks for following up.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#684