[Bug]: Metadata NFO and Covers not saving with library items for eBooks/PDFs #1977

Closed
opened 2026-04-25 00:01:59 +02:00 by adam · 11 comments
Owner

Originally created by @colvdv on GitHub (May 9, 2024).

What happened?

I checked the box for metadata and covers to be stored with the library items but it is only doing so for my audiobook files. I have a library of PDFs also but the metadata doesn't seem to want to relocate itself.

What did you expect to happen?

I expect metadata and covers to be found with the items they belong to, for all library items with metadata.

Steps to reproduce the issue

  1. Create eBook library, fill it with PDFs.
  2. Edit metadata and covers for PDFs.
  3. Toggle On "Store covers with item" and "Store metadata with item".
  4. Refresh everything and patiently wait for it to move items, but it doesn't ever move them.

Audiobookshelf version

v2.9.0

How are you running audiobookshelf?

Windows Tray App

What OS is your Audiobookshelf server hosted from?

Windows

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

None

Logs

No response

Additional Notes

No response

Originally created by @colvdv on GitHub (May 9, 2024). ### What happened? I checked the box for metadata and covers to be stored with the library items but it is only doing so for my audiobook files. I have a library of PDFs also but the metadata doesn't seem to want to relocate itself. ### What did you expect to happen? I expect metadata and covers to be found with the items they belong to, for all library items with metadata. ### Steps to reproduce the issue 1. Create eBook library, fill it with PDFs. 2. Edit metadata and covers for PDFs. 3. Toggle On "Store covers with item" and "Store metadata with item". 4. Refresh everything and patiently wait for it to move items, but it doesn't ever move them. ### Audiobookshelf version v2.9.0 ### How are you running audiobookshelf? Windows Tray App ### What OS is your Audiobookshelf server hosted from? Windows ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs _No response_ ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:01:59 +02:00
adam closed this issue 2026-04-25 00:01:59 +02:00
Author
Owner

@nichwall commented on GitHub (May 10, 2024):

The metadata is not moved automatically. Right now you will need to enable the "Store with..." settings first. The metadata files are written when the item is modified in ABS, so if the setting is enabled when you modify things, it will be saved with the media.

A tool to move the metadata and covers between the two locations is planned.

@nichwall commented on GitHub (May 10, 2024): The metadata is not moved automatically. Right now you will need to enable the "Store with..." settings first. The metadata files are written when the item is modified in ABS, so if the setting is enabled when you modify things, it will be saved with the media. A tool to move the metadata and covers between the two locations is planned.
Author
Owner

@colvdv commented on GitHub (May 10, 2024):

I made changes to a few files shortly after receiving your reply but I am still not seeing metadata or cover files being added to the item location. This is for my eBooks library which contains only PDFs and I have all of them in the same folder since I can edit metadata for individual book files within ABS easily and it organizes how I'd like, not sure if that matters.

A tool for moving these would be excellent. I am planning a switch from Windows to Linux soon and am thus preparing as best I can now for the changeover, organizing metadata and covers is a must!

@colvdv commented on GitHub (May 10, 2024): I made changes to a few files shortly after receiving your reply but I am still not seeing metadata or cover files being added to the item location. This is for my eBooks library which contains only PDFs and I have all of them in the same folder since I can edit metadata for individual book files within ABS easily and it organizes how I'd like, not sure if that matters. A tool for moving these would be excellent. I am planning a switch from Windows to Linux soon and am thus preparing as best I can now for the changeover, organizing metadata and covers is a must!
Author
Owner

@advplyr commented on GitHub (May 11, 2024):

@colvdv Have you tried making a change inside Abs to see if it creates the metadata file? For example, add a random tag to one of the books that doesn't have a metadata file and see if it creates one in the book folder.

The cover isn't going to be moved unless you remove the cover from inside Abs and add it again.

@advplyr commented on GitHub (May 11, 2024): @colvdv Have you tried making a change inside Abs to see if it creates the metadata file? For example, add a random tag to one of the books that doesn't have a metadata file and see if it creates one in the book folder. The cover isn't going to be moved unless you remove the cover from inside Abs and add it again.
Author
Owner

@colvdv commented on GitHub (May 11, 2024):

@colvdv Have you tried making a change inside Abs to see if it creates the metadata file? For example, add a random tag to one of the books that doesn't have a metadata file and see if it creates one in the book folder.

Yes, I made changes earlier and again just now with the tags, but I'm not seeing any metadata files appear. For audiobooks yes, it is working. But for my PDF library is where I am having troubles.

@colvdv commented on GitHub (May 11, 2024): > @colvdv Have you tried making a change inside Abs to see if it creates the metadata file? For example, add a random tag to one of the books that doesn't have a metadata file and see if it creates one in the book folder. Yes, I made changes earlier and again just now with the tags, but I'm not seeing any metadata files appear. For audiobooks yes, it is working. But for my PDF library is where I am having troubles.
Author
Owner

@advplyr commented on GitHub (May 11, 2024):

Can you enable debug logs and make another edit in Abs for that book? If you watch the logs you will see debug logs about the update you made and then about it saving metadata to a file location. That file location is what we need to know about.

@advplyr commented on GitHub (May 11, 2024): Can you enable debug logs and make another edit in Abs for that book? If you watch the logs you will see debug logs about the update you made and then about it saving metadata to a file location. That file location is what we need to know about.
Author
Owner

@colvdv commented on GitHub (May 11, 2024):

Can you enable debug logs and make another edit in Abs for that book? If you watch the logs you will see debug logs about the update you made and then about it saving metadata to a file location. That file location is what we need to know about.

2024-05-11 12:32:46.081

DEBUG

[BookMetadata] Key updated genres Personal Development

2024-05-11 12:32:46.081

DEBUG

[LibraryItemController] Updated library item media Transcending the Levels of Consciousness

2024-05-11 12:32:46.103

DEBUG

[LibraryItem] Success saving abmetadata to "E:_SYSTEM\Audiobookshelf\metadata\items\d6c78d3b-923c-4942-a239-c65619513731\metadata.json"

2024-05-11 12:32:46.122

DEBUG

[LibraryItem] "Transcending the Levels of Consciousness" book.genres updated from to Personal Development

2024-05-11 12:32:46.162

DEBUG

[ApiCacheManager] book.afterUpdate: Clearing cache

2024-05-11 12:32:46.163

DEBUG

[LibraryItem] "Transcending the Levels of Consciousness" updatedAt updated from 1715452274677 to 1715452366081

2024-05-11 12:32:46.224

DEBUG

[ApiCacheManager] libraryItem.afterUpdate: Clearing cache

2024-05-11 12:32:46.225

INFO

[LibraryItem] Library item "d6c78d3b-923c-4942-a239-c65619513731" updated

I can see where it is going, but it isn't going where I want it to.

@colvdv commented on GitHub (May 11, 2024): > Can you enable debug logs and make another edit in Abs for that book? If you watch the logs you will see debug logs about the update you made and then about it saving metadata to a file location. That file location is what we need to know about. 2024-05-11 12:32:46.081 DEBUG [BookMetadata] Key updated genres Personal Development 2024-05-11 12:32:46.081 DEBUG [LibraryItemController] Updated library item media Transcending the Levels of Consciousness 2024-05-11 12:32:46.103 DEBUG [LibraryItem] Success saving abmetadata to "E:\_SYSTEM\Audiobookshelf\metadata\items\d6c78d3b-923c-4942-a239-c65619513731\metadata.json" 2024-05-11 12:32:46.122 DEBUG [LibraryItem] "Transcending the Levels of Consciousness" book.genres updated from to Personal Development 2024-05-11 12:32:46.162 DEBUG [ApiCacheManager] book.afterUpdate: Clearing cache 2024-05-11 12:32:46.163 DEBUG [LibraryItem] "Transcending the Levels of Consciousness" updatedAt updated from 1715452274677 to 1715452366081 2024-05-11 12:32:46.224 DEBUG [ApiCacheManager] libraryItem.afterUpdate: Clearing cache 2024-05-11 12:32:46.225 INFO [LibraryItem] Library item "d6c78d3b-923c-4942-a239-c65619513731" updated I can see where it is going, but it isn't going where I want it to.
Author
Owner

@advplyr commented on GitHub (May 15, 2024):

Are the PDFs in sub-folders? If the PDF is in the library root folder it isn't going to put the metadata.json files there

@advplyr commented on GitHub (May 15, 2024): Are the PDFs in sub-folders? If the PDF is in the library root folder it isn't going to put the `metadata.json` files there
Author
Owner

@colvdv commented on GitHub (May 15, 2024):

Are the PDFs in sub-folders? If the PDF is in the library root folder it isn't going to put the metadata.json files there

No sub-folders, no. I have all of them in one folder, which is the library folder.

How might I go about moving them while keeping the metadata and covers? If I change the library directory I lose the metadata, that's the issue I'm experiencing.

@colvdv commented on GitHub (May 15, 2024): > Are the PDFs in sub-folders? If the PDF is in the library root folder it isn't going to put the `metadata.json` files there No sub-folders, no. I have all of them in one folder, which is the library folder. How might I go about moving them while keeping the metadata and covers? If I change the library directory I lose the metadata, that's the issue I'm experiencing.
Author
Owner

@advplyr commented on GitHub (May 16, 2024):

Moving the file into a subfolder should keep it the same item because it uses the inode value of the file. If you are using a network file system that isn't assigning inode values properly then you will have to remove the item from Abs and re-add it once it is in a subdirectory.
Moving a file from the root library folder to a sub-folder was fixed in https://github.com/advplyr/audiobookshelf/pull/2773. The original bug report was https://github.com/advplyr/audiobookshelf/issues/2767

@advplyr commented on GitHub (May 16, 2024): Moving the file into a subfolder should keep it the same item because it uses the inode value of the file. If you are using a network file system that isn't assigning inode values properly then you will have to remove the item from Abs and re-add it once it is in a subdirectory. Moving a file from the root library folder to a sub-folder was fixed in https://github.com/advplyr/audiobookshelf/pull/2773. The original bug report was https://github.com/advplyr/audiobookshelf/issues/2767
Author
Owner

@colvdv commented on GitHub (May 18, 2024):

Moving the file into a subfolder should keep it the same item because it uses the inode value of the file. If you are using a network file system that isn't assigning inode values properly then you will have to remove the item from Abs and re-add it once it is in a subdirectory.

Do I need folders for each book PDF, or would just author folders work with all PDFs from that author in the same folder?

@colvdv commented on GitHub (May 18, 2024): > Moving the file into a subfolder should keep it the same item because it uses the inode value of the file. If you are using a network file system that isn't assigning inode values properly then you will have to remove the item from Abs and re-add it once it is in a subdirectory. > Do I need folders for each book PDF, or would just author folders work with all PDFs from that author in the same folder?
Author
Owner

@nichwall commented on GitHub (May 18, 2024):

Do I need folders for each book PDF, or would just author folders work with all PDFs from that author in the same folder?

All library items need to be in their own folder unless they are in the root folder.

@nichwall commented on GitHub (May 18, 2024): > Do I need folders for each book PDF, or would just author folders work with all PDFs from that author in the same folder? All library items need to be in their own folder unless they are in the root folder.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1977