[Bug]: Metadata not found when adding a new library #1737

Closed
opened 2026-04-24 23:56:20 +02:00 by adam · 3 comments
Owner

Originally created by @derhappy on GitHub (Feb 14, 2024).

Describe the issue

We have a functioning library based on a single folder with all our audiobooks. For all audiobooks we maintained metadata and covers, stored at the central location.
Now I need to start separating the libraries, mostly between the kids and adults because there are some overlaps, but also many audiobooks which should only be visible to some of the users.
I created a new library pointing to the same folder and started scanning.
All audiobooks are found, but the metadata and covers are mostly missing. Some data seems to be downloaded, and embedded metadata is also found, but the metadata and covers from the central location seems to be ignored.

Steps to reproduce the issue

  1. Create library with centralized metadata and covers
  2. Create new library pointing to the same data folder
  3. Start scan to fill the library

Audiobookshelf version

v2.7.2

How are you running audiobookshelf?

Docker

Originally created by @derhappy on GitHub (Feb 14, 2024). ### Describe the issue We have a functioning library based on a single folder with all our audiobooks. For all audiobooks we maintained metadata and covers, stored at the central location. Now I need to start separating the libraries, mostly between the kids and adults because there are some overlaps, but also many audiobooks which should only be visible to some of the users. I created a new library pointing to the same folder and started scanning. All audiobooks are found, but the metadata and covers are mostly missing. Some data seems to be downloaded, and embedded metadata is also found, but the metadata and covers from the central location seems to be ignored. ### Steps to reproduce the issue 1. Create library with centralized metadata and covers 2. Create new library pointing to the same data folder 3. Start scan to fill the library ### Audiobookshelf version v2.7.2 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:56:20 +02:00
adam closed this issue 2026-04-24 23:56:21 +02:00
Author
Owner

@nichwall commented on GitHub (Feb 14, 2024):

So you are not using the "Store Metadata with Item" or "Store Cover with item"?

This is expected behavior because there is no overlap in library items between libraries in the database. The files that are getting the correct metadata are probably ones you embedded the metadata back in to the media, put the metadata in the folder with the media, or just had correct metadata to begin with.

You will either need to store the metadata with the library items themselves or manually edit the database to move things around between libraries. You will also need to manually copy user progress to the new library items if you care about that (user progress will not be synced if the same book is in two libraries, there are feature requests for this sort of thing but all of them require a database rework).

Another option is to limit user access by tags instead of library.

@nichwall commented on GitHub (Feb 14, 2024): So you are not using the "Store Metadata with Item" or "Store Cover with item"? This is expected behavior because there is no overlap in library items between libraries in the database. The files that are getting the correct metadata are probably ones you embedded the metadata back in to the media, put the metadata in the folder with the media, or just had correct metadata to begin with. You will either need to store the metadata with the library items themselves or manually edit the database to move things around between libraries. You will also need to manually copy user progress to the new library items if you care about that (user progress will not be synced if the same book is in two libraries, there are feature requests for this sort of thing but all of them require a database rework). Another option is to limit user access by tags instead of library.
Author
Owner

@derhappy commented on GitHub (Feb 14, 2024):

Thank you for your feedback and clarification @nichwall !

Indeed, the only items with (full) metadata are those where I saved the file in the folder or exported it back to the files.
I was hoping the data was centralized between all libraries because I would suspect it to always be the same, maybe with exception of the tags. After all, it's the same item that's described.

Is there a way to export the metadata and title for all library items at once instead of manually for each entry?
Otherwise I'll take a look at the tags.

@derhappy commented on GitHub (Feb 14, 2024): Thank you for your feedback and clarification @nichwall ! Indeed, the only items with (full) metadata are those where I saved the file in the folder or exported it back to the files. I was hoping the data was centralized between all libraries because I would suspect it to always be the same, maybe with exception of the tags. After all, it's the same item that's described. Is there a way to export the metadata and title for all library items at once instead of manually for each entry? Otherwise I'll take a look at the tags.
Author
Owner

@nichwall commented on GitHub (Feb 14, 2024):

There is a batch embed, but I would avoid that or make a backup first if you have m4b files. Tone has issues embedding into existing m4b files sometimes and can result in corrupted media files. Work has begun to replace Tone with ffmpeg but is not done yet.

You could change the server settings to "Store with item", then bulk edit a new tag to all library items to force the metadata file to be generated next to the media files, then bulk edit to remove the new tag you just made. I don't remember if that will work for covers.

Note that this will still not sync progress for a user across libraries.

@nichwall commented on GitHub (Feb 14, 2024): There is a batch embed, but I would avoid that or make a backup first if you have m4b files. Tone has issues embedding into existing m4b files sometimes and can result in corrupted media files. Work has begun to replace Tone with ffmpeg but is not done yet. You could change the server settings to "Store with item", then bulk edit a new tag to all library items to force the metadata file to be generated next to the media files, then bulk edit to remove the new tag you just made. I don't remember if that will work for covers. Note that this will still not sync progress for a user across libraries.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1737