[Bug]: Book covers not working after restoring backup #2879

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

Originally created by @ratsputin on GitHub (Jul 10, 2025).

What happened?

After restoring a backup taken last weekend, all of my audiobook covers are showing as invalid in the library and items views. The oddball issue is that there are cover.jpg files in the item directories, and if I go in to modify the cover, the contents of that file is shown as the book's cover (even though the library view shows invalid).

What did you expect to happen?

Restoring the backup should have restored all of the covers and should have displayed correctly in the library view.

Steps to reproduce the issue

  1. Create a backup
  2. Restore the backup

Audiobookshelf version

2.25.1

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

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

Chrome

Logs

2025-07-10 10:04:09.521

INFO

=== Starting Server ===

2025-07-10 10:04:09.522

INFO

[Server] Init v2.25.1

2025-07-10 10:04:09.522

INFO

[Server] Node.js Version: v20.19.2

2025-07-10 10:04:09.522

INFO

[Server] Platform: linux

2025-07-10 10:04:09.523

INFO

[Server] Arch: x64

2025-07-10 10:04:09.547

INFO

[Database] Initializing db at "/config/absdatabase.sqlite"

2025-07-10 10:04:09.569

INFO

[Database] Loading extension /usr/local/lib/nusqlite3/libnusqlite3.so

2025-07-10 10:04:09.570

INFO

[Database] Successfully loaded extension /usr/local/lib/nusqlite3/libnusqlite3.so

2025-07-10 10:04:09.570

INFO

[Database] Db supports unaccent and unicode foldings

2025-07-10 10:04:09.570

INFO

[Database] Db connection was successful

2025-07-10 10:04:09.578

INFO

[MigrationManager] Database is already up to date.

2025-07-10 10:04:09.713

INFO

[Database] Db initialized with models: user, library, libraryFolder, book, podcast, podcastEpisode, libraryItem, mediaProgress, series, bookSeries, author, bookAuthor, collection, collectionBook, playlist, playlistMediaItem, device, playbackSession, feed, feedEpisode, setting, customMetadataProvider, mediaItemShare

2025-07-10 10:04:09.723

DEBUG

Set Log Level to DEBUG

2025-07-10 10:04:09.757

INFO

[Database] running ANALYZE

2025-07-10 10:04:09.765

INFO

[Database] ANALYZE completed

2025-07-10 10:04:09.769

DEBUG

Daily Log file found 2025-07-01.txt

2025-07-10 10:04:09.770

DEBUG

Daily Log file found 2025-07-03.txt

2025-07-10 10:04:09.770

DEBUG

Daily Log file found 2025-07-04.txt

2025-07-10 10:04:09.770

DEBUG

Daily Log file found 2025-07-05.txt

2025-07-10 10:04:09.770

DEBUG

Daily Log file found 2025-07-06.txt

2025-07-10 10:04:09.770

DEBUG

Daily Log file found 2025-07-09.txt

2025-07-10 10:04:09.770

DEBUG

Daily Log file found 2025-07-10.txt

2025-07-10 10:04:09.770

INFO

[LogManager] Init current daily log filename: 2025-07-10.txt

2025-07-10 10:04:09.854

DEBUG

[BackupManager] Backup found "2025-07-05T1625"

2025-07-10 10:04:09.856

INFO

[BackupManager] 1 Backups Found

2025-07-10 10:04:09.856

INFO

[BackupManager] Auto Backups are disabled

2025-07-10 10:04:09.873

INFO

[Watcher] Initializing watcher for "Audio Books".

2025-07-10 10:04:09.873

DEBUG

[Watcher] Init watcher for library folder path "/audiobooks"

2025-07-10 10:04:09.874

INFO

[Watcher] Initializing watcher for "eBooks".

2025-07-10 10:04:09.875

DEBUG

[Watcher] Init watcher for library folder path "/audiobooks"

2025-07-10 10:04:09.884

INFO

Listening on port :80

2025-07-10 10:04:10.114

INFO

[SocketAuthority] Socket Connected to /audiobookshelf/socket.io YWywWA7OUNIGHnSGAAAB

2025-07-10 10:04:12.010

DEBUG

[SocketAuthority] User Online root

2025-07-10 10:04:15.298

INFO

[Watcher] "eBooks" Ready

2025-07-10 10:04:15.309

INFO

[Watcher] "Audio Books" Ready

2025-07-10 10:05:27.643

DEBUG

[ApiCacheManager] count: 0 size: 0

2025-07-10 10:05:27.766

DEBUG

Loaded filterdata in 0.12s

2025-07-10 10:05:27.773

DEBUG

[ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/5de6003c-db00-4b2a-9129-e6c829d02da3?include=filterdata"}

2025-07-10 10:05:27.804

DEBUG

[ApiCacheManager] count: 1 size: 16237

2025-07-10 10:05:27.824

DEBUG

Loaded 0 of 0 items for "Continue Listening/Reading" in 0.02s

2025-07-10 10:05:27.840

DEBUG

Loaded 0 of 0 items for "Continue Series" in 0.01s

2025-07-10 10:05:27.871

DEBUG

Loaded 10 of 23 items for "Recently Added" in 0.03s

2025-07-10 10:05:27.898

DEBUG

Loaded 5 of 5 series for "Recent Series" in 0.03s

2025-07-10 10:05:27.983

DEBUG

Loaded 10 of 59 items for "Discover" in 0.09s

2025-07-10 10:05:27.990

DEBUG

Loaded 0 of 0 items for "Listen/Read Again" in 0.01s

2025-07-10 10:05:27.998

DEBUG

Loaded 4 of 4 authors for "Newest Authors" in 0.01s

2025-07-10 10:05:27.998

DEBUG

Loaded 4 personalized shelves in 0.19s

2025-07-10 10:05:27.999

DEBUG

[ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/5de6003c-db00-4b2a-9129-e6c829d02da3/personalized?include=rssfeed,numEpisodesIncomplete,share"}

2025-07-10 10:05:28.000

DEBUG

[ApiCacheManager] Caching with 1800000 ms TTL

2025-07-10 10:10:03.271

DEBUG

[ApiCacheManager] count: 2 size: 81553

2025-07-10 10:10:03.273

DEBUG

[ApiCacheManager] Cache hit: {"user":"root","url":"/libraries/5de6003c-db00-4b2a-9129-e6c829d02da3?include=filterdata"}

2025-07-10 10:10:03.301

DEBUG

[ApiCacheManager] count: 2 size: 81553

2025-07-10 10:10:03.301

DEBUG

[ApiCacheManager] Cache hit: {"user":"root","url":"/libraries/5de6003c-db00-4b2a-9129-e6c829d02da3/personalized?include=rssfeed,numEpisodesIncomplete,share"}

Additional Notes

I identified a specific item (03a44dc1-75db-420a-8fa5-ce16203ed4f1) that was having an issue. The API call was:

http://debian.dante.local:13378/audiobookshelf/api/items/03a44dc1-75db-420a-8fa5-ce16203ed4f1/cover?ts=1751748740193

Initially, accessing this in my browser returned Not Found.

Checking for that ID, I found the following:

root@debian:/mnt/SharedVolume/AudioBookshelf/metadata# find . -name \*03a44dc1-75db-420a-8fa5-ce16203ed4f1\* -print
./items/03a44dc1-75db-420a-8fa5-ce16203ed4f1
./cache/covers/03a44dc1-75db-420a-8fa5-ce16203ed4f1_400.webp
./cache/covers/03a44dc1-75db-420a-8fa5-ce16203ed4f1_400_093025.webp
root@debian:/mnt/SharedVolume/AudioBookshelf/metadata# ls -Flash ./items/03a44dc1-75db-420a-8fa5-ce16203ed4f1
total 40K
   0 drwxr-xr-x 2 wyer wyer    0 Jul  5 15:52 ./
   0 drwxr-xr-x 2 wyer wyer    0 Jul  5 16:57 ../
 36K -rwxr-xr-x 1 wyer wyer  34K Jul 10 09:36 cover.jpg*
4.0K -rwxr-xr-x 1 wyer wyer 2.5K Jul 10 09:36 metadata.json*
root@debian:/mnt/SharedVolume/AudioBookshelf/metadata#

The JPEG file did correspond to the image shown when I tried to edit the cover; however, from the library view, the cover image was listed as invalid.

Shortly after trying this, it appears that AudioBookshelf downloaded a new cover image; however, the JPEG file in the items directory hasn't been replaced.

In short, the correct cover image is in the item directory and was restored from the backup; however, it isn't being used for the library view.

One additional troubleshooting step I used was to restore the cached covers directory manually from before the restore process blew them away. This did not address the issue.

Originally created by @ratsputin on GitHub (Jul 10, 2025). ### What happened? After restoring a backup taken last weekend, all of my audiobook covers are showing as invalid in the library and items views. The oddball issue is that there are `cover.jpg` files in the item directories, and if I go in to modify the cover, the contents of that file is shown as the book's cover (even though the library view shows invalid). ### What did you expect to happen? Restoring the backup should have restored all of the covers and should have displayed correctly in the library view. ### Steps to reproduce the issue 1. Create a backup 2. Restore the backup ### Audiobookshelf version 2.25.1 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Chrome ### Logs ```shell 2025-07-10 10:04:09.521 INFO === Starting Server === 2025-07-10 10:04:09.522 INFO [Server] Init v2.25.1 2025-07-10 10:04:09.522 INFO [Server] Node.js Version: v20.19.2 2025-07-10 10:04:09.522 INFO [Server] Platform: linux 2025-07-10 10:04:09.523 INFO [Server] Arch: x64 2025-07-10 10:04:09.547 INFO [Database] Initializing db at "/config/absdatabase.sqlite" 2025-07-10 10:04:09.569 INFO [Database] Loading extension /usr/local/lib/nusqlite3/libnusqlite3.so 2025-07-10 10:04:09.570 INFO [Database] Successfully loaded extension /usr/local/lib/nusqlite3/libnusqlite3.so 2025-07-10 10:04:09.570 INFO [Database] Db supports unaccent and unicode foldings 2025-07-10 10:04:09.570 INFO [Database] Db connection was successful 2025-07-10 10:04:09.578 INFO [MigrationManager] Database is already up to date. 2025-07-10 10:04:09.713 INFO [Database] Db initialized with models: user, library, libraryFolder, book, podcast, podcastEpisode, libraryItem, mediaProgress, series, bookSeries, author, bookAuthor, collection, collectionBook, playlist, playlistMediaItem, device, playbackSession, feed, feedEpisode, setting, customMetadataProvider, mediaItemShare 2025-07-10 10:04:09.723 DEBUG Set Log Level to DEBUG 2025-07-10 10:04:09.757 INFO [Database] running ANALYZE 2025-07-10 10:04:09.765 INFO [Database] ANALYZE completed 2025-07-10 10:04:09.769 DEBUG Daily Log file found 2025-07-01.txt 2025-07-10 10:04:09.770 DEBUG Daily Log file found 2025-07-03.txt 2025-07-10 10:04:09.770 DEBUG Daily Log file found 2025-07-04.txt 2025-07-10 10:04:09.770 DEBUG Daily Log file found 2025-07-05.txt 2025-07-10 10:04:09.770 DEBUG Daily Log file found 2025-07-06.txt 2025-07-10 10:04:09.770 DEBUG Daily Log file found 2025-07-09.txt 2025-07-10 10:04:09.770 DEBUG Daily Log file found 2025-07-10.txt 2025-07-10 10:04:09.770 INFO [LogManager] Init current daily log filename: 2025-07-10.txt 2025-07-10 10:04:09.854 DEBUG [BackupManager] Backup found "2025-07-05T1625" 2025-07-10 10:04:09.856 INFO [BackupManager] 1 Backups Found 2025-07-10 10:04:09.856 INFO [BackupManager] Auto Backups are disabled 2025-07-10 10:04:09.873 INFO [Watcher] Initializing watcher for "Audio Books". 2025-07-10 10:04:09.873 DEBUG [Watcher] Init watcher for library folder path "/audiobooks" 2025-07-10 10:04:09.874 INFO [Watcher] Initializing watcher for "eBooks". 2025-07-10 10:04:09.875 DEBUG [Watcher] Init watcher for library folder path "/audiobooks" 2025-07-10 10:04:09.884 INFO Listening on port :80 2025-07-10 10:04:10.114 INFO [SocketAuthority] Socket Connected to /audiobookshelf/socket.io YWywWA7OUNIGHnSGAAAB 2025-07-10 10:04:12.010 DEBUG [SocketAuthority] User Online root 2025-07-10 10:04:15.298 INFO [Watcher] "eBooks" Ready 2025-07-10 10:04:15.309 INFO [Watcher] "Audio Books" Ready 2025-07-10 10:05:27.643 DEBUG [ApiCacheManager] count: 0 size: 0 2025-07-10 10:05:27.766 DEBUG Loaded filterdata in 0.12s 2025-07-10 10:05:27.773 DEBUG [ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/5de6003c-db00-4b2a-9129-e6c829d02da3?include=filterdata"} 2025-07-10 10:05:27.804 DEBUG [ApiCacheManager] count: 1 size: 16237 2025-07-10 10:05:27.824 DEBUG Loaded 0 of 0 items for "Continue Listening/Reading" in 0.02s 2025-07-10 10:05:27.840 DEBUG Loaded 0 of 0 items for "Continue Series" in 0.01s 2025-07-10 10:05:27.871 DEBUG Loaded 10 of 23 items for "Recently Added" in 0.03s 2025-07-10 10:05:27.898 DEBUG Loaded 5 of 5 series for "Recent Series" in 0.03s 2025-07-10 10:05:27.983 DEBUG Loaded 10 of 59 items for "Discover" in 0.09s 2025-07-10 10:05:27.990 DEBUG Loaded 0 of 0 items for "Listen/Read Again" in 0.01s 2025-07-10 10:05:27.998 DEBUG Loaded 4 of 4 authors for "Newest Authors" in 0.01s 2025-07-10 10:05:27.998 DEBUG Loaded 4 personalized shelves in 0.19s 2025-07-10 10:05:27.999 DEBUG [ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/5de6003c-db00-4b2a-9129-e6c829d02da3/personalized?include=rssfeed,numEpisodesIncomplete,share"} 2025-07-10 10:05:28.000 DEBUG [ApiCacheManager] Caching with 1800000 ms TTL 2025-07-10 10:10:03.271 DEBUG [ApiCacheManager] count: 2 size: 81553 2025-07-10 10:10:03.273 DEBUG [ApiCacheManager] Cache hit: {"user":"root","url":"/libraries/5de6003c-db00-4b2a-9129-e6c829d02da3?include=filterdata"} 2025-07-10 10:10:03.301 DEBUG [ApiCacheManager] count: 2 size: 81553 2025-07-10 10:10:03.301 DEBUG [ApiCacheManager] Cache hit: {"user":"root","url":"/libraries/5de6003c-db00-4b2a-9129-e6c829d02da3/personalized?include=rssfeed,numEpisodesIncomplete,share"} ``` ### Additional Notes I identified a specific item (`03a44dc1-75db-420a-8fa5-ce16203ed4f1`) that was having an issue. The API call was: `http://debian.dante.local:13378/audiobookshelf/api/items/03a44dc1-75db-420a-8fa5-ce16203ed4f1/cover?ts=1751748740193` Initially, accessing this in my browser returned `Not Found`. Checking for that ID, I found the following: ``` root@debian:/mnt/SharedVolume/AudioBookshelf/metadata# find . -name \*03a44dc1-75db-420a-8fa5-ce16203ed4f1\* -print ./items/03a44dc1-75db-420a-8fa5-ce16203ed4f1 ./cache/covers/03a44dc1-75db-420a-8fa5-ce16203ed4f1_400.webp ./cache/covers/03a44dc1-75db-420a-8fa5-ce16203ed4f1_400_093025.webp root@debian:/mnt/SharedVolume/AudioBookshelf/metadata# ls -Flash ./items/03a44dc1-75db-420a-8fa5-ce16203ed4f1 total 40K 0 drwxr-xr-x 2 wyer wyer 0 Jul 5 15:52 ./ 0 drwxr-xr-x 2 wyer wyer 0 Jul 5 16:57 ../ 36K -rwxr-xr-x 1 wyer wyer 34K Jul 10 09:36 cover.jpg* 4.0K -rwxr-xr-x 1 wyer wyer 2.5K Jul 10 09:36 metadata.json* root@debian:/mnt/SharedVolume/AudioBookshelf/metadata# ``` The JPEG file did correspond to the image shown when I tried to edit the cover; however, from the library view, the cover image was listed as invalid. Shortly after trying this, it appears that AudioBookshelf downloaded a new cover image; however, the JPEG file in the items directory hasn't been replaced. In short, the correct cover image is in the item directory and was restored from the backup; however, it isn't being used for the library view. One additional troubleshooting step I used was to restore the cached covers directory manually from before the restore process blew them away. This did not address the issue.
adam added the bug label 2026-04-25 00:11:29 +02:00
adam closed this issue 2026-04-25 00:11:30 +02:00
Author
Owner

@Vito0912 commented on GitHub (Jul 10, 2025):

Can you check two things:

  1. Did the directory structure stay the same?
  2. Did you clear the cache in the settings?

For 2. if not try this and report back

@Vito0912 commented on GitHub (Jul 10, 2025): Can you check two things: 1. Did the directory structure stay the same? 2. Did you clear the cache in the settings? For 2. if not try this and report back
Author
Owner

@ratsputin commented on GitHub (Jul 10, 2025):

  1. The directory structure did stay the same
  2. I just did a "Purge All Cache" from the settings page and verified the cache directories are empty

Still the same behavior. I've attached a screenshot that demonstrates the issue.

Image
@ratsputin commented on GitHub (Jul 10, 2025): 1. The directory structure did stay the same 2. I just did a "Purge All Cache" from the settings page and verified the cache directories are empty Still the same behavior. I've attached a screenshot that demonstrates the issue. <img width="1460" height="1344" alt="Image" src="https://github.com/user-attachments/assets/53d1624c-e80e-41eb-8ea2-47831f24f4bd" />
Author
Owner

@nichwall commented on GitHub (Jul 10, 2025):

What happened?

After restoring a backup taken last weekend, all of my audiobook covers are showing as invalid in the library and items views. The oddball issue is that there are cover.jpg files in the item directories, and if I go in to modify the cover, the contents of that file is shown as the book's cover (even though the library view shows invalid).

Can you clarify what invalid means? Like is the empty gray box or the Invalid Cover shown in https://github.com/advplyr/audiobookshelf/issues/4090 ?

Do you have "Store Cover with Item" enabled in the settings?

Checking for that ID, I found the following:

root@debian:/mnt/SharedVolume/AudioBookshelf/metadata# find . -name \*03a44dc1-75db-420a-8fa5-ce16203ed4f1\* -print
./items/03a44dc1-75db-420a-8fa5-ce16203ed4f1
./cache/covers/03a44dc1-75db-420a-8fa5-ce16203ed4f1_400.webp
./cache/covers/03a44dc1-75db-420a-8fa5-ce16203ed4f1_400_093025.webp

The cache should be cleared when restoring from backup, can you confirm whether those cached covers were not removed correctly or whether they were regenerated when trying to access the covers? You said you manually tried to restore the cache so not sure what that means.

@nichwall commented on GitHub (Jul 10, 2025): > ### What happened? > > After restoring a backup taken last weekend, all of my audiobook covers are showing as invalid in the library and items views. The oddball issue is that there are `cover.jpg` files in the item directories, and if I go in to modify the cover, the contents of that file is shown as the book's cover (even though the library view shows invalid). > Can you clarify what invalid means? Like is the empty gray box or the Invalid Cover shown in https://github.com/advplyr/audiobookshelf/issues/4090 ? Do you have "Store Cover with Item" enabled in the settings? > Checking for that ID, I found the following: > > ``` > root@debian:/mnt/SharedVolume/AudioBookshelf/metadata# find . -name \*03a44dc1-75db-420a-8fa5-ce16203ed4f1\* -print > ./items/03a44dc1-75db-420a-8fa5-ce16203ed4f1 > ./cache/covers/03a44dc1-75db-420a-8fa5-ce16203ed4f1_400.webp > ./cache/covers/03a44dc1-75db-420a-8fa5-ce16203ed4f1_400_093025.webp > ``` The cache should be cleared when restoring from backup, can you confirm whether those cached covers were not removed correctly or whether they were regenerated when trying to access the covers? You said you manually tried to restore the cache so not sure what that means.
Author
Owner

@ratsputin commented on GitHub (Jul 10, 2025):

Here is a screenshot of the specific item I was talking about. The image shown in the background is the one that Audiobookshelf apparently automatically downloaded. It started being returned on that API call later after I got the Not Found.

Image

This is what the home page looks like now (including this book and the book from the screenshot I posted a moment ago).

Image

Regarding manually restoring the cache, I had a copy of the cache directory from before the restore (I saved it before doing the restore). Thinking that might resolve the issue, I restored all of those cache files that were deleted during the restore. That (obviously) didn't resolve the issue. Those files have since been deleted when I did the purge all.

@ratsputin commented on GitHub (Jul 10, 2025): Here is a screenshot of the specific item I was talking about. The image shown in the background is the one that Audiobookshelf apparently automatically downloaded. It started being returned on that API call later after I got the Not Found. <img width="1441" height="1279" alt="Image" src="https://github.com/user-attachments/assets/d6ec9fb9-d6e6-4ac3-882c-ec63e4f083fd" /> This is what the home page looks like now (including this book and the book from the screenshot I posted a moment ago). <img width="1468" height="330" alt="Image" src="https://github.com/user-attachments/assets/10f85b40-8901-4543-ba30-38b092293bd6" /> Regarding manually restoring the cache, I had a copy of the cache directory from before the restore (I saved it before doing the restore). Thinking that might resolve the issue, I restored all of those cache files that were deleted during the restore. That (obviously) didn't resolve the issue. Those files have since been deleted when I did the purge all.
Author
Owner

@nichwall commented on GitHub (Jul 10, 2025):

Here is a screenshot of the specific item I was talking about. The image shown in the background is the one that Audiobookshelf apparently automatically downloaded. It started being returned on that API call later after I got the Not Found.

Audiobookshelf only downloads cover images if you accept the Match, use Quick Match, or use the cover picker and select one of the images. Audiobookshelf does not automatically download any files or metadata from online providers, it is intentionally a manual action. Are you sure that image was not embedded in the audio file?

Can you find the file path of the square cover image that you say is the incorrect one?

Regarding manually restoring the cache, I had a copy of the cache directory from before the restore (I saved it before doing the restore). Thinking that might resolve the issue, I restored all of those cache files that were deleted during the restore. That (obviously) didn't resolve the issue. Those files have since been deleted when I did the purge all.

Thanks for confirming. That is expected behavior, where they are removed during a backup restore and when you purge the cache.

@nichwall commented on GitHub (Jul 10, 2025): > Here is a screenshot of the specific item I was talking about. The image shown in the background is the one that Audiobookshelf apparently automatically downloaded. It started being returned on that API call later after I got the Not Found. Audiobookshelf only downloads cover images if you accept the Match, use Quick Match, or use the cover picker and select one of the images. Audiobookshelf does not automatically download any files or metadata from online providers, it is intentionally a manual action. Are you sure that image was not embedded in the audio file? Can you find the file path of the square cover image that you say is the incorrect one? > Regarding manually restoring the cache, I had a copy of the cache directory from before the restore (I saved it before doing the restore). Thinking that might resolve the issue, I restored all of those cache files that were deleted during the restore. That (obviously) didn't resolve the issue. Those files have since been deleted when I did the purge all. Thanks for confirming. That is expected behavior, where they are removed during a backup restore and when you purge the cache.
Author
Owner

@ratsputin commented on GitHub (Jul 10, 2025):

Audiobookshelf only downloads cover images if you accept the Match, use Quick Match, or use the cover picker and select one of the images. Audiobookshelf does not automatically download any files or metadata from online providers, it is intentionally a manual action. Are you sure that image was not embedded in the audio file?

Apologies, that image could very well be in the file. It is an m4b file. I haven't worked with Audiobookshelf enough to know the ins and outs of its behavior.

@ratsputin commented on GitHub (Jul 10, 2025): > Audiobookshelf only downloads cover images if you accept the Match, use Quick Match, or use the cover picker and select one of the images. Audiobookshelf does not automatically download any files or metadata from online providers, it is intentionally a manual action. Are you sure that image was not embedded in the audio file? Apologies, that image could very well be in the file. It _is_ an m4b file. I haven't worked with Audiobookshelf enough to know the ins and outs of its behavior.
Author
Owner

@nichwall commented on GitHub (Jul 10, 2025):

Audiobookshelf only downloads cover images if you accept the Match, use Quick Match, or use the cover picker and select one of the images. Audiobookshelf does not automatically download any files or metadata from online providers, it is intentionally a manual action. Are you sure that image was not embedded in the audio file?

Apologies, that image could very well be in the file. It is an m4b file. I haven't worked with Audiobookshelf enough to know the ins and outs of its behavior.

No worries. The main question is where did that image come from to narrow down the issue (a different cover image stored somewhere, embedded in an audio file, etc).

Can you also share your server settings, and whether you have changed them at all? Specifically this part
Screenshot_20250710-090853.png

@nichwall commented on GitHub (Jul 10, 2025): > > Audiobookshelf only downloads cover images if you accept the Match, use Quick Match, or use the cover picker and select one of the images. Audiobookshelf does not automatically download any files or metadata from online providers, it is intentionally a manual action. Are you sure that image was not embedded in the audio file? > > Apologies, that image could very well be in the file. It _is_ an m4b file. I haven't worked with Audiobookshelf enough to know the ins and outs of its behavior. No worries. The main question is where did that image come from to narrow down the issue (a different cover image stored somewhere, embedded in an audio file, etc). Can you also share your server settings, and whether you have changed them at all? Specifically this part ![Screenshot_20250710-090853.png](https://github.com/user-attachments/assets/3a375ade-7c7e-497a-bcdd-f93ccb4d12ce)
Author
Owner

@ratsputin commented on GitHub (Jul 10, 2025):

Thank you for your help!

Image
@ratsputin commented on GitHub (Jul 10, 2025): Thank you for your help! <img width="1123" height="696" alt="Image" src="https://github.com/user-attachments/assets/4134f87a-703e-4b1b-ae8c-24986d573176" />
Author
Owner

@ratsputin commented on GitHub (Jul 10, 2025):

Oh, and I did play the m4b file back in VLC and it displayed that same cover so the picture definitely came from the file.

@ratsputin commented on GitHub (Jul 10, 2025): Oh, and I did play the m4b file back in VLC and it displayed that same cover so the picture definitely came from the file.
Author
Owner

@ratsputin commented on GitHub (Jul 10, 2025):

Incidentally, as a side note, if I go to the authors page, it automatically populates their images and a bunch of new image files show up in cache/images/. It's just not happening with the books.

@ratsputin commented on GitHub (Jul 10, 2025): Incidentally, as a side note, if I go to the authors page, it automatically populates their images and a bunch of new image files show up in `cache/images/`. It's just not happening with the books.
Author
Owner

@ratsputin commented on GitHub (Jul 11, 2025):

I don't know if this is helpful or not, but I tried turning on "Ignore prefixes when sorting" and now about 2/3 of the books in my library have the proper cover image. I know that many of these images are not from the audiobook file, but rather from the cover image I set previously.

An understanding of where the image shown in the library comes from (presumably the cache) and how it gets updated (I'm assuming there's some logic that is supposed to be triggered when the cache is empty and that's what's failing) would be helpful.

Is there a higher level of debug or another set of logs I can look at? I would expect to see some sort of error message when there's an invalid image or the cache update fails but nothing is reflected in the logs.

@ratsputin commented on GitHub (Jul 11, 2025): I don't know if this is helpful or not, but I tried turning on "Ignore prefixes when sorting" and now about 2/3 of the books in my library have the proper cover image. I know that many of these images are not from the audiobook file, but rather from the cover image I set previously. An understanding of where the image shown in the library comes from (presumably the cache) and how it gets updated (I'm assuming there's some logic that is supposed to be triggered when the cache is empty and that's what's failing) would be helpful. Is there a higher level of debug or another set of logs I can look at? I would expect to see some sort of error message when there's an invalid image or the cache update fails but nothing is reflected in the logs.
Author
Owner

@ratsputin commented on GitHub (Jul 11, 2025):

Okay, this is interesting. I started playing with this a bit more and cleared the cache again. Once the library images repopulated, I went and looked in the metadata/cache/covers directory and there are only two files there. I manually updated a couple of covers and now see four files there.

It appears that there must be some logic that causes cover images to either be pulled from the metadata/cache/items directory or the metadata/cache/covers directory. I'm now starting to wonder if this is what's broken, as I frequently have an issue after a reboot where the volume where all of my audiobook data is not mounted when the container starts. I have to stop the container, mount the volume, then restart the container.

Is it possible that the path for the cover image in the database is flagged as invalid if it tries to render the library and can't find the cover image at that time and it will never try to do it again?

@ratsputin commented on GitHub (Jul 11, 2025): Okay, this is interesting. I started playing with this a bit more and cleared the cache again. Once the library images repopulated, I went and looked in the `metadata/cache/covers` directory and there are only two files there. I manually updated a couple of covers and now see four files there. It appears that there must be some logic that causes cover images to either be pulled from the `metadata/cache/items` directory _or_ the `metadata/cache/covers` directory. I'm now starting to wonder if this is what's broken, as I frequently have an issue after a reboot where the volume where all of my audiobook data is not mounted when the container starts. I have to stop the container, mount the volume, then restart the container. Is it possible that the path for the cover image in the database is flagged as invalid if it tries to render the library and can't find the cover image at that time and it will never try to do it again?
Author
Owner

@advplyr commented on GitHub (Jul 11, 2025):

When a cover image is requested:

  1. Checks if path exists in cache (/metadata/cache/covers)
  2. If in cache then return cached image
  3. If not in cache then resize the image and put in cache and return the newly cached image

https://github.com/advplyr/audiobookshelf/blob/9c0c7b6b08ec68d9b80f2c8aec21f7052ea9433a/server/controllers/LibraryItemController.js#L373-L405

https://github.com/advplyr/audiobookshelf/blob/9c0c7b6b08ec68d9b80f2c8aec21f7052ea9433a/server/managers/CacheManager.js#L33-L59

@advplyr commented on GitHub (Jul 11, 2025): When a cover image is requested: 1. Checks if path exists in cache (`/metadata/cache/covers`) 2. If in cache then return cached image 3. If not in cache then resize the image and put in cache and return the newly cached image https://github.com/advplyr/audiobookshelf/blob/9c0c7b6b08ec68d9b80f2c8aec21f7052ea9433a/server/controllers/LibraryItemController.js#L373-L405 https://github.com/advplyr/audiobookshelf/blob/9c0c7b6b08ec68d9b80f2c8aec21f7052ea9433a/server/managers/CacheManager.js#L33-L59
Author
Owner

@ratsputin commented on GitHub (Jul 11, 2025):

Well, with no explanation whatsoever, the issue has now resolved itself. I just randomly checked the covers and 99% of them had repopulated.

@ratsputin commented on GitHub (Jul 11, 2025): Well, with no explanation whatsoever, the issue has now resolved itself. I just randomly checked the covers and 99% of them had repopulated.
Author
Owner

@nichwall commented on GitHub (Jul 11, 2025):

Well, with no explanation whatsoever, the issue has now resolved itself. I just randomly checked the covers and 99% of them had repopulated.

Glad you got it figured out, but that is weird.

@nichwall commented on GitHub (Jul 11, 2025): > Well, with no explanation whatsoever, the issue has now resolved itself. I just randomly checked the covers and 99% of them had repopulated. Glad you got it figured out, but that is weird.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2879