[Bug]: Lookup Chapters does not clear all previous chapters #2986

Closed
opened 2026-04-25 00:12:45 +02:00 by adam · 1 comment
Owner

Originally created by @red-bw on GitHub (Sep 4, 2025).

What happened?

I have chapters already for a book. This was ripped from Audio CD and when importing into Audiobookshelf I marked all the tracks as chapters. There are 41 of them which was incorrect but I had not yet listened to the book so I did not know this. I had thought each audio track was a chapter.

To experience the issue, I go to the Chapters page, click Lookup, click Search, then click Apply Chapters. It turns out the book only has 14 chapters. The first 14 get overwritten. Chapters 15-41 still exist but now with an error due to Invalid start time. I can either manually remove 15-41 one at a time, or I can click Remove All, get forcibly booted from the chapters page, go back into chapters and start the lookup process again.

As an aside, there are a few things that could be done to make the chapter lookup easier.

  • Add Chapters to the hamburger menu on each book to take you directly to the edit chapters page saving 2 clicks (currently pencil, chapters tab, edit chapters button). This has an added benefit of not needing the pencil icon of which the top two right most books get blocked every time you leave the chapter edit page from a notification.
  • When in the Chapter Edit page, allow to stay on the edit page when clicking Remove All.

What did you expect to happen?

At the Applying Chapters stage, when clicking Apply Chapters, I would expect all existing chapters to be removed first, then the new chapters applied.

Steps to reproduce the issue

  1. Have a book with existing chapters as identified from Audible.
  2. Add a new chapter to the end of the list manually (might need to modify time of previous chapter slightly for new chapter to fit book length).
  3. Click lookup and apply chapters from Audible.
  4. Notice that the extra chapter is still there (though timing of previous chapter was fixed).

Audiobookshelf version

v2.29.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Firefox

Logs


Additional Notes

No response

Originally created by @red-bw on GitHub (Sep 4, 2025). ### What happened? I have chapters already for a book. This was ripped from Audio CD and when importing into Audiobookshelf I marked all the tracks as chapters. There are 41 of them which was incorrect but I had not yet listened to the book so I did not know this. I had thought each audio track was a chapter. To experience the issue, I go to the Chapters page, click Lookup, click Search, then click Apply Chapters. It turns out the book only has 14 chapters. The first 14 get overwritten. Chapters 15-41 still exist but now with an error due to Invalid start time. I can either manually remove 15-41 one at a time, or I can click Remove All, get forcibly booted from the chapters page, go back into chapters and start the lookup process again. As an aside, there are a few things that could be done to make the chapter lookup easier. - Add Chapters to the hamburger menu on each book to take you directly to the edit chapters page saving 2 clicks (currently pencil, chapters tab, edit chapters button). This has an added benefit of not needing the pencil icon of which the top two right most books get blocked every time you leave the chapter edit page from a notification. - When in the Chapter Edit page, allow to stay on the edit page when clicking Remove All. ### What did you expect to happen? At the Applying Chapters stage, when clicking Apply Chapters, I would expect all existing chapters to be removed first, then the new chapters applied. ### Steps to reproduce the issue 1. Have a book with existing chapters as identified from Audible. 2. Add a new chapter to the end of the list manually (might need to modify time of previous chapter slightly for new chapter to fit book length). 3. Click lookup and apply chapters from Audible. 4. Notice that the extra chapter is still there (though timing of previous chapter was fixed). ### Audiobookshelf version v2.29.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Firefox ### Logs ```shell ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:12:45 +02:00
adam closed this issue 2026-04-25 00:12:45 +02:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 8, 2025):

Fixed in v2.30.0.

@github-actions[bot] commented on GitHub (Oct 8, 2025): Fixed in [v2.30.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.30.0).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2986