[Enhancement]: Keep metadata when moving library folders #2140

Closed
opened 2026-04-25 00:03:55 +02:00 by adam · 2 comments
Owner

Originally created by @martinjgrunwald on GitHub (Aug 4, 2024).

Type of Enhancement

Web Interface/Frontend

Describe the Feature/Enhancement

ABS should keep all metadata when files are moved to a new location.

Why would this be helpful?

I use ABS inside a docker container. Currently, when I mount the same files in a different location ABS loses metadata like when it was added or if I (or other users) have listened to that audiobook already. I have a different top level folder inside my ABS container for every library. On the storage systems they are all subfolders on the same level. I would like to create a similar structure inside the container.

Currently:

/library1
/library2

What I would like:

/media/library1
/media//library2

This would allow me to add more libraries without touching my Docker Compose file

Future Implementation (Screenshot)

I don't have a screenshot or a doodle but I have two ideas based on how other apps solve this problem:

  1. *arr suite: When changing directories, they ask me if it should move the files or if I do this myself. I would choose the latter. Before, I would mount the same files under /library1 and/media/library1inside the container. The files would already be where they are supposed to be and the metadata would be kept.
  2. Plex: I would replace the old folder with the new one within the Libraries -> Edit Library -> Add folders menu. Plex would then execute two steps. First it would mark all my items as "deleted" and, if I deselected Empty trash automatically after every scan the files are only marked as deleted but all metadata is kept. Second, it would scan the new folder, remove the deletion mark from all items it finds and keep all metadata.

For me, any of those variants is fine, though I prefer the "Plex method".

Audiobookshelf Server Version

2.11.0

Current Implementation (Screenshot)

No response

Originally created by @martinjgrunwald on GitHub (Aug 4, 2024). ### Type of Enhancement Web Interface/Frontend ### Describe the Feature/Enhancement ABS should keep all metadata when files are moved to a new location. ### Why would this be helpful? I use ABS inside a docker container. Currently, when I mount the same files in a different location ABS loses metadata like when it was added or if I (or other users) have listened to that audiobook already. I have a different top level folder inside my ABS container for every library. On the storage systems they are all subfolders on the same level. I would like to create a similar structure inside the container. Currently: ``` /library1 /library2 ``` What I would like: ``` /media/library1 /media//library2 ``` This would allow me to add more libraries without touching my Docker Compose file ### Future Implementation (Screenshot) I don't have a screenshot or a doodle but I have two ideas based on how other apps solve this problem: 1. *arr suite: When changing directories, they ask me if it should move the files or if I do this myself. I would choose the latter. Before, I would mount the same files under `/library1` and`/media/library1`inside the container. The files would already be where they are supposed to be and the metadata would be kept. 2. Plex: I would replace the old folder with the new one within the `Libraries -> Edit Library -> Add folders` menu. Plex would then execute two steps. First it would mark all my items as "deleted" and, if I deselected `Empty trash automatically after every scan` the files are only marked as deleted but all metadata is kept. Second, it would scan the new folder, remove the deletion mark from all items it finds and keep all metadata. For me, any of those variants is fine, though I prefer the "Plex method". ### Audiobookshelf Server Version 2.11.0 ### Current Implementation (Screenshot) _No response_
adam added the enhancement label 2026-04-25 00:03:55 +02:00
adam closed this issue 2026-04-25 00:03:55 +02:00
Author
Owner

@advplyr commented on GitHub (Aug 4, 2024):

2. Plex: I would replace the old folder with the new one within the Libraries -> Edit Library -> Add folders menu. Plex would then execute two steps. First it would mark all my items as "deleted" and, if I deselected Empty trash automatically after every scan the files are only marked as deleted but all metadata is kept. Second, it would scan the new folder, remove the deletion mark from all items it finds and keep all metadata.

The step you're skipping here that is the step that makes this difficult for Abs is how the newly scanned in files are matched up with the metadata from the deleted files.
Abs is different from Plex in that there is not an external metadata provider that is used on every item that could provide an identifier. It could be achieved by hashing every file but I don't think it is a viable option, brought up #2551

@advplyr commented on GitHub (Aug 4, 2024): > 2\. Plex: I would replace the old folder with the new one within the `Libraries -> Edit Library -> Add folders` menu. Plex would then execute two steps. First it would mark all my items as "deleted" and, if I deselected `Empty trash automatically after every scan` the files are only marked as deleted but all metadata is kept. Second, it would scan the new folder, remove the deletion mark from all items it finds and keep all metadata. The step you're skipping here that is the step that makes this difficult for Abs is how the newly scanned in files are matched up with the metadata from the deleted files. Abs is different from Plex in that there is not an external metadata provider that is used on every item that could provide an identifier. It could be achieved by hashing every file but I don't think it is a viable option, brought up #2551
Author
Owner

@ZLoth commented on GitHub (Aug 7, 2024):

Does this issue occur when you have Settings → General → Store metadata with item enabled?

@ZLoth commented on GitHub (Aug 7, 2024): Does this issue occur when you have Settings → General → Store metadata with item enabled?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2140