[PR #716] [MERGED] Add support for leveraging chapter data directly from Overdrive mp3s during scanning #3398

Closed
opened 2026-04-25 00:15:30 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/716
Author: @jmt-gh
Created: 6/11/2022
Status: Merged
Merged: 6/14/2022
Merged by: @advplyr

Base: masterHead: abs_overdrive


📝 Commits (10+)

  • fc614b9 Add support for overdrive media marker file tag
  • 27e6b9c DRAFT client support for overdrive media markers
  • 430fbf5 Parse out mediamarkers from all files
  • e01748e Full support for generating/applying chapter data
  • b90934a remove unused modal
  • effc637 remove unused console.log
  • b3d9323 Initial commit for server side approach
  • 68afc2c Add support for various scan types
  • 3d85d0b add settings page setting
  • 5a071ba added library/ to .gitignore

📊 Changes

13 files changed (+203 additions, -17 deletions)

View changed files

📝 .gitignore (+2 -1)
📝 client/pages/config/index.vue (+12 -1)
📝 server/controllers/PodcastController.js (+1 -1)
📝 server/objects/mediaTypes/Book.js (+12 -3)
📝 server/objects/metadata/AudioMetaTags.js (+5 -1)
📝 server/objects/metadata/BookMetadata.js (+4 -0)
📝 server/objects/settings/ServerSettings.js (+3 -0)
📝 server/scanner/LibraryScan.js (+1 -0)
📝 server/scanner/MediaFileScanner.js (+3 -2)
📝 server/scanner/ScanOptions.js (+4 -1)
📝 server/scanner/Scanner.js (+7 -7)
server/utils/parsers/parseOverdriveMediaMarkers.js (+148 -0)
📝 server/utils/prober.js (+1 -0)

📄 Description

Overdrive MP3s come in multiple parts when downloaded from Overdrive with each part containing a certain number of chapters. Each part also includes a special metadata tag, called OverDrive MediaMarkers that describes the timestamps for those chapters (relative to the part) in an XML format.

This PR adds support to ABS to natively parse the OverDrive MediaMarkers metadata, and offer the option to use it to populate the chapter metadata in ABS during scanning. Users can toggle this functionality as a server setting from the server settings UI.

Once enabled, it behaves similarly to other metadata scanning:

  • For existing books, it requires a force re-scan (either individual, or at the library level) to apply
  • For new books, it will take place automatically upon a regular scan, a force re-scan, or the automated watcher scan
  • For new and existing books that do not have this meta tag, ABS will fall back to the standard chapter logic

Future Work
There are two things I'd like to look at in future PRs:

  1. I'm not super happy with how Book is now having to be made aware of server settings. I'd like to continue extracting out the logic for setChapters further, and creating server/parsers/chapters, which will hold different ways for us to parse and generate chapter information. This will then also allow us to handle decision logic on which parser further up in one of the scanners, outside of Book, and inject it directly as a dependency.
  2. Bringing this to the client-side experience. Particularly the edit-chapter page, to allow users to leverage this on a per-book basis without having to enable it globally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/716 **Author:** [@jmt-gh](https://github.com/jmt-gh) **Created:** 6/11/2022 **Status:** ✅ Merged **Merged:** 6/14/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `abs_overdrive` --- ### 📝 Commits (10+) - [`fc614b9`](https://github.com/advplyr/audiobookshelf/commit/fc614b983362f713c41c4b64656bd41607a82303) Add support for overdrive media marker file tag - [`27e6b9c`](https://github.com/advplyr/audiobookshelf/commit/27e6b9ce0d7171f68cae9f94f76479a3eeef122f) DRAFT client support for overdrive media markers - [`430fbf5`](https://github.com/advplyr/audiobookshelf/commit/430fbf5e46fc3db696d7aa45d6f37e47dced8f87) Parse out mediamarkers from all files - [`e01748e`](https://github.com/advplyr/audiobookshelf/commit/e01748eb2f9ff071d9001d3dad60ba6efa76c627) Full support for generating/applying chapter data - [`b90934a`](https://github.com/advplyr/audiobookshelf/commit/b90934a72aced4fb20c8e606ec1f124c26a9986a) remove unused modal - [`effc637`](https://github.com/advplyr/audiobookshelf/commit/effc63755b5191dd6a8f7dd3151648f928fb6b13) remove unused console.log - [`b3d9323`](https://github.com/advplyr/audiobookshelf/commit/b3d9323f66e75583e90d0bd44bf3d9474d82a5b7) Initial commit for server side approach - [`68afc2c`](https://github.com/advplyr/audiobookshelf/commit/68afc2c718dab441f39ba7ed9df349a4dbbe2ee4) Add support for various scan types - [`3d85d0b`](https://github.com/advplyr/audiobookshelf/commit/3d85d0bce67ed2ce868f598172bb05063639a5d4) add settings page setting - [`5a071ba`](https://github.com/advplyr/audiobookshelf/commit/5a071babe9b4bcde2e69a1b8a9610b73bdeb9c49) added library/ to .gitignore ### 📊 Changes **13 files changed** (+203 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -1) 📝 `client/pages/config/index.vue` (+12 -1) 📝 `server/controllers/PodcastController.js` (+1 -1) 📝 `server/objects/mediaTypes/Book.js` (+12 -3) 📝 `server/objects/metadata/AudioMetaTags.js` (+5 -1) 📝 `server/objects/metadata/BookMetadata.js` (+4 -0) 📝 `server/objects/settings/ServerSettings.js` (+3 -0) 📝 `server/scanner/LibraryScan.js` (+1 -0) 📝 `server/scanner/MediaFileScanner.js` (+3 -2) 📝 `server/scanner/ScanOptions.js` (+4 -1) 📝 `server/scanner/Scanner.js` (+7 -7) ➕ `server/utils/parsers/parseOverdriveMediaMarkers.js` (+148 -0) 📝 `server/utils/prober.js` (+1 -0) </details> ### 📄 Description Overdrive MP3s come in multiple parts when downloaded from Overdrive with each part containing a certain number of chapters. Each part also includes a special metadata tag, called `OverDrive MediaMarkers` that describes the timestamps for those chapters (relative to the part) in an XML format. This PR adds support to ABS to natively parse the `OverDrive MediaMarkers` metadata, and offer the option to use it to populate the chapter metadata in ABS during scanning. Users can toggle this functionality as a server setting from the server settings UI. Once enabled, it behaves similarly to other metadata scanning: - For existing books, it requires a force re-scan (either individual, or at the library level) to apply - For new books, it will take place automatically upon a regular scan, a force re-scan, or the automated watcher scan - For new and existing books that do not have this meta tag, ABS will fall back to the standard chapter logic **Future Work** There are two things I'd like to look at in future PRs: 1. I'm not super happy with how `Book` is now having to be made aware of server settings. I'd like to continue extracting out the logic for setChapters further, and creating `server/parsers/chapters`, which will hold different ways for us to parse and generate chapter information. This will then also allow us to handle decision logic on which parser further up in one of the scanners, outside of `Book`, and inject it directly as a dependency. 2. Bringing this to the client-side experience. Particularly the edit-chapter page, to allow users to leverage this on a per-book basis without having to enable it globally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:15:30 +02:00
adam closed this issue 2026-04-25 00:15:30 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3398