Covers break when moving metadata path #722

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

Originally created by @watsonbox on GitHub (Oct 6, 2023).

Steps to reproduce

  1. Install Audiobookshelf on Linux (metadata in /usr/share/audiobookshelf/metadata)
  2. Move the installation to Docker (metadata in /metadata)
  3. Restore from a backup

Expected behaviour

In this case I'd expect all metadata, including covers, to still work and be accessible from the new metadata path even though it changed.

Actual behaviour

Covers are not visible (404 not found errors). I can see from the cover tab that the old metadata path is still saved as part of the cover file path, presumably in the database itself:

image

Would it be possible to store the paths relative to the configured metadata path?

Incidentally, I was able to work around this with the following docker-compose setup:

environment:
  - METADATA_PATH=/usr/share/audiobookshelf/metadata
volumes:
  - ./metadata:/usr/share/audiobookshelf/metadata

Environment data

Audiobookshelf Version: 2.4.4

  • Android App?
  • iOS App?
Originally created by @watsonbox on GitHub (Oct 6, 2023). ### Steps to reproduce 1. Install Audiobookshelf on Linux (metadata in `/usr/share/audiobookshelf/metadata`) 2. Move the installation to Docker (metadata in `/metadata`) 3. Restore from a backup ### Expected behaviour In this case I'd expect all metadata, including covers, to still work and be accessible from the new `metadata` path even though it changed. ### Actual behaviour Covers are not visible (404 not found errors). I can see from the cover tab that the old metadata path is still saved as part of the cover file path, presumably in the database itself: <img width="1017" alt="image" src="https://github.com/advplyr/audiobookshelf-app/assets/17737/d9705642-5f47-4efd-bccc-0943b951338d"> **Would it be possible to store the paths _relative_ to the configured metadata path?** Incidentally, I was able to work around this with the following `docker-compose` setup: ```yaml environment: - METADATA_PATH=/usr/share/audiobookshelf/metadata volumes: - ./metadata:/usr/share/audiobookshelf/metadata ``` ### Environment data Audiobookshelf Version: 2.4.4 - [ ] Android App? - [ ] iOS App?
adam added the bug label 2026-04-24 23:35:33 +02:00
adam closed this issue 2026-04-24 23:35:34 +02:00
Author
Owner

@advplyr commented on GitHub (Oct 6, 2023):

As far as I know there is nothing we can do about this. The paths have to match. The workaround you mention is the solution.

@advplyr commented on GitHub (Oct 6, 2023): As far as I know there is nothing we can do about this. The paths have to match. The workaround you mention is the solution.
Author
Owner

@hobesman commented on GitHub (Oct 7, 2023):

Back when the library was a json file, you could manually search and replace location references. I'm not familiar enough with the new database model to say if that's still viable.

@hobesman commented on GitHub (Oct 7, 2023): Back when the library was a json file, you could manually search and replace location references. I'm not familiar enough with the new database model to say if that's still viable.
Author
Owner

@advplyr commented on GitHub (Oct 7, 2023):

I think for most people it would be easier now to update the database because it's sqlite

@advplyr commented on GitHub (Oct 7, 2023): I think for most people it would be easier now to update the database because it's sqlite
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#722