[Enhancement]: Better identify missing books #1470

Closed
opened 2026-04-24 23:46:45 +02:00 by adam · 4 comments
Owner

Originally created by @troycarpenter on GitHub (Oct 18, 2023).

Describe the feature/enhancement

I recently had an issue where a large portion of my audio library was erased. However, not everything was erased. Sometimes it was some or all of the audio files, all files including artwork, or even the book directories.

When everything was deleted, Audiobookshelf correctly tagged the books as missing. However, if only some of the audio tracks were deleted, or the album art remained in the folder, the book was not marked as missing. In short, if anything existed in the audiobook's directory, the book was not marked as missing and it was hard to figure out which books needed to be restored.

I'm asking for a way for Audiobookshelf to be able to recognize and notify if an audiobook no longer has audio files. By extension it would be nice if it notified if any files go missing, and a way to reconcile that with the background scanner that simply changes the Audio/Library files list as things change.

Example:

The book "Black Beauty" by Anna Sewell went missing, directories and all. Audiobookshelf correctly marked it is missing. However, when I recreated the directories for the book (in Linux: mkdir -p "Anna Sewell/Black Beauty" ), and then created an empty file in the directory (touch testfile.txt), Even without adding any audio files, Audiobookshelf then removed this book from the Missing list, and it no longer appeared under Issues. Only by removing the created directories, the book returned to the missing state as expected.

Before creating the directories and adding the file, I noticed that Audiobookshelf still showed the previous files as they were in the database, I expect. Perhaps adding "files" to the "missing" library filter would create a quick list of books that have missing files.

Originally created by @troycarpenter on GitHub (Oct 18, 2023). ### Describe the feature/enhancement I recently had an issue where a large portion of my audio library was erased. However, not _everything_ was erased. Sometimes it was some or all of the audio files, all files including artwork, or even the book directories. When everything was deleted, Audiobookshelf correctly tagged the books as missing. However, if only some of the audio tracks were deleted, or the album art remained in the folder, the book was not marked as missing. In short, if anything existed in the audiobook's directory, the book was not marked as missing and it was hard to figure out which books needed to be restored. I'm asking for a way for Audiobookshelf to be able to recognize and notify if an audiobook no longer has audio files. By extension it would be nice if it notified if any files go missing, and a way to reconcile that with the background scanner that simply changes the Audio/Library files list as things change. Example: The book "Black Beauty" by Anna Sewell went missing, directories and all. Audiobookshelf correctly marked it is missing. However, when I recreated the directories for the book (in Linux: mkdir -p "Anna Sewell/Black Beauty" ), and then created an empty file in the directory (touch testfile.txt), Even without adding any audio files, Audiobookshelf then removed this book from the Missing list, and it no longer appeared under Issues. Only by removing the created directories, the book returned to the missing state as expected. Before creating the directories and adding the file, I noticed that Audiobookshelf still showed the previous files as they were in the database, I expect. Perhaps adding "files" to the "missing" library filter would create a quick list of books that have missing files.
adam added the enhancement label 2026-04-24 23:46:45 +02:00
adam closed this issue 2026-04-24 23:46:45 +02:00
Author
Owner

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

This may be a bug with the new scanner added in 2.4.4. The scanner should mark a book as missing if it has no abook or ebook files. Are you using server v2.4.4?

@advplyr commented on GitHub (Oct 18, 2023): This may be a bug with the new scanner added in 2.4.4. The scanner should mark a book as missing if it has no abook or ebook files. Are you using server v2.4.4?
Author
Owner

@troycarpenter commented on GitHub (Oct 18, 2023):

Yes, it says 2.4.4 in the lower left corner. I'm using the docker container.

I was restoring music files after the mystery erasure and only started audiobooks in the past few weeks. It's possible it worked in a previous version but I didn't start looking in earnest until probably after the upgrade to 2.4.4.

@troycarpenter commented on GitHub (Oct 18, 2023): Yes, it says 2.4.4 in the lower left corner. I'm using the docker container. I was restoring music files after the mystery erasure and only started audiobooks in the past few weeks. It's possible it worked in a previous version but I didn't start looking in earnest until probably after the upgrade to 2.4.4.
Author
Owner

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

This will be fixed on the next release. I tested this by removing all the audio files and watched the book be marked as missing. Then added back some audio files and watched it be updated to no longer missing.

@advplyr commented on GitHub (Oct 19, 2023): This will be fixed on the next release. I tested this by removing all the audio files and watched the book be marked as missing. Then added back some audio files and watched it be updated to no longer missing.
Author
Owner

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

Fixed in v2.5.0

@advplyr commented on GitHub (Oct 29, 2023): Fixed in [v2.5.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.5.0)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1470