[Enhancement]: Removing a book from the filesystem doesn't remove it from audiobookshelf #2447

Open
opened 2026-04-25 00:07:14 +02:00 by adam · 24 comments
Owner

Originally created by @dessalines on GitHub (Dec 31, 2024).

What happened?

I removed a book from my filesystem, but for some reason it's still showing up as missing on audiobookshelf.

What's worse is that there's no way to remove it now, either from within the android app, or the web interface. Really it should be auto-removed on rescans.

What did you expect to happen?

A rescan should remove books that are missing.

Steps to reproduce the issue

  1. Delete a book
  2. It still shows up and is marked as missing in audiobookshelf
  3. There's no way to delete it.

Audiobookshelf version

v2.7.16

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

No response

Additional Notes

No response

Originally created by @dessalines on GitHub (Dec 31, 2024). ### What happened? I removed a book from my filesystem, but for some reason it's still showing up as missing on audiobookshelf. What's worse is that there's no way to remove it now, either from within the android app, or the web interface. Really it should be auto-removed on rescans. ### What did you expect to happen? A rescan should remove books that are missing. ### Steps to reproduce the issue 1. Delete a book 2. It still shows up and is marked as missing in audiobookshelf 3. There's no way to delete it. ### Audiobookshelf version v2.7.16 ### 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 _No response_ ### Additional Notes _No response_
adam added the enhancementbacklog labels 2026-04-25 00:07:14 +02:00
Author
Owner

@nichwall commented on GitHub (Dec 31, 2024):

ABS does not delete books if they are removed from the file system and are marked as missing so you are aware that ABS thinks files are missing. Can you explain what you mean by "no way to delete it"?

You can edit the book and press the "delete" button, or go to the Issues tab in the navigation bar in the web client and delete missing books. This tab may not show up in a mobile browser depending on the screen dimensions.

@nichwall commented on GitHub (Dec 31, 2024): ABS does not delete books if they are removed from the file system and are marked as missing so you are aware that ABS thinks files are missing. Can you explain what you mean by "no way to delete it"? You can edit the book and press the "delete" button, or go to the Issues tab in the navigation bar in the web client and delete missing books. This tab may not show up in a mobile browser depending on the screen dimensions.
Author
Owner

@dessalines commented on GitHub (Dec 31, 2024):

I can't see the issue tabs on either android, or the web app.

Also why is it showing missing books? I don't know of any other media server that does that behavior. Not jellyfin, navidrome, or any other app. If you remove the file, it may keep the metadata stored, but it doesn't display missing items in the user interface.

I hit this because I sometimes download a few different versions of audiobooks to see which one is the best quality, and then remove the ones that don't. I did this, and now it shows versions of books I deleted on my main page.

@dessalines commented on GitHub (Dec 31, 2024): I can't see the issue tabs on either android, or the web app. Also why is it showing missing books? I don't know of any other media server that does that behavior. Not jellyfin, navidrome, or any other app. If you remove the file, it may keep the metadata stored, but it doesn't display missing items in the user interface. I hit this because I sometimes download a few different versions of audiobooks to see which one is the best quality, and then remove the ones that don't. I did this, and now it shows versions of books I deleted on my main page.
Author
Owner

@nichwall commented on GitHub (Dec 31, 2024):

Can you share a screenshot of the issues tab not showing up?

The metadata is no longer tracked when it is deleted from ABS, so it shows up to let the user know that there is metadata without a corresponding file. This metadata is not deleted in case the file being inaccessible is temporary (drive was not mounted correctly, file permissions changed, etc)

@nichwall commented on GitHub (Dec 31, 2024): Can you share a screenshot of the issues tab not showing up? The metadata is no longer tracked when it is deleted from ABS, so it shows up to let the user know that there is metadata without a corresponding file. This metadata is not deleted in case the file being inaccessible is temporary (drive was not mounted correctly, file permissions changed, etc)
Author
Owner

@dessalines commented on GitHub (Dec 31, 2024):

Android app: no issues tab, incorrectly shows the books I deleted.

Screenshot_2024-12-31-17-20-37-75_e9782661401ed6f222682e1e02b74bd4

Web app: No issues tab, shows missing metadata on the front page for books I deleted.

Screenshot_2024-12-31-17-20-59-11_4d38fce200f96aeac5e860e739312e76

The metadata is no longer tracked when it is deleted from ABS, so it shows up to let the user know that there is metadata without a corresponding file. This metadata is not deleted in case the file being inaccessible is temporary (drive was not mounted correctly, file permissions changed, etc)

This is incorrectly assuming that missing files are bugs, and not that the user intentionally deleted them.

A better solution would be to do what all the other media servers do: not display items that are missing on your front page, and add a setting (default false maybe) that allows rescans to clear metadata for missing files. If you want to display errors for missing files, then it'd be better to do that on a different page.

@dessalines commented on GitHub (Dec 31, 2024): Android app: no issues tab, incorrectly shows the books I deleted. ![Screenshot_2024-12-31-17-20-37-75_e9782661401ed6f222682e1e02b74bd4](https://github.com/user-attachments/assets/7b2e6ee6-19b5-4827-a05a-9a0ad83ee7df) Web app: No issues tab, shows missing metadata on the front page for books I deleted. ![Screenshot_2024-12-31-17-20-59-11_4d38fce200f96aeac5e860e739312e76](https://github.com/user-attachments/assets/f2c6ec2c-94c2-4488-b6f5-5556008c12d4) > The metadata is no longer tracked when it is deleted from ABS, so it shows up to let the user know that there is metadata without a corresponding file. This metadata is not deleted in case the file being inaccessible is temporary (drive was not mounted correctly, file permissions changed, etc) This is incorrectly assuming that missing files are bugs, and not that the user intentionally deleted them. A better solution would be to do what all the other media servers do: not display items that are missing on your front page, and add a setting (default false maybe) that allows rescans to clear metadata for missing files. If you want to display errors for missing files, then it'd be better to do that on a different page.
Author
Owner

@nichwall commented on GitHub (Dec 31, 2024):

You can edit the book and press the "delete" button, or go to the Issues tab in the navigation bar in the web client and delete missing books. This tab may not show up in a mobile browser depending on the screen dimensions.

Try using the web client in a computer, change your phone to landscape mode, or change the mobile browser to Desktop view.

@nichwall commented on GitHub (Dec 31, 2024): > You can edit the book and press the "delete" button, or go to the Issues tab in the navigation bar in the web client and delete missing books. This tab may not show up in a mobile browser depending on the screen dimensions. Try using the web client in a computer, change your phone to landscape mode, or change the mobile browser to Desktop view.
Author
Owner

@nichwall commented on GitHub (Dec 31, 2024):

The issues tab is visible here when not using the mobile view.

Screenshot_20241231-153348.png

@nichwall commented on GitHub (Dec 31, 2024): The issues tab is visible here when not using the mobile view. ![Screenshot_20241231-153348.png](https://github.com/user-attachments/assets/bd7dda88-5960-4858-a886-6174386c9870)
Author
Owner

@dessalines commented on GitHub (Jan 1, 2025):

That should probably be a different bug report, that items are missing in mobile view, not following responsive design.

@dessalines commented on GitHub (Jan 1, 2025): That should probably be a different bug report, that items are missing in mobile view, not following responsive design.
Author
Owner

@2fst4u commented on GitHub (Jan 8, 2025):

I would personally prefer a trash handling setting which enables removal of items when their underlying files are deleted. I've also found this frustrating at times.

@2fst4u commented on GitHub (Jan 8, 2025): I would personally prefer a trash handling setting which enables removal of items when their underlying files are deleted. I've also found this frustrating at times.
Author
Owner

@ZLoth commented on GitHub (Jan 9, 2025):

I consider this a feature, not a bug. While I am able to directly access my audiobooks from my TrueNAS server to my Docker instance, some installs may be on a separate system and access the audiobook files on another system. That book may temporarily be inaccessable.

I also had a temporary "missing" occur when I found out a individual book was part of a series, and I moved it to the appropriate subdirectory.

@ZLoth commented on GitHub (Jan 9, 2025): I consider this a feature, not a bug. While I am able to directly access my audiobooks from my TrueNAS server to my Docker instance, some installs may be on a separate system and access the audiobook files on another system. That book may temporarily be inaccessable. I also had a temporary "missing" occur when I found out a individual book was part of a series, and I moved it to the appropriate subdirectory.
Author
Owner

@2fst4u commented on GitHub (Jan 9, 2025):

So let it be a setting.

@2fst4u commented on GitHub (Jan 9, 2025): So let it be a setting.
Author
Owner

@dessalines commented on GitHub (Jan 9, 2025):

There is no other media server software that does this.

If you delete a song from navidrome, or movie from jellyfin, it may keep the metadata, but it definitely removes it from your visible library. Keeping (or rather displaying) intentionally deleted media is a bug, not a feature.

@dessalines commented on GitHub (Jan 9, 2025): There is no other media server software that does this. If you delete a song from navidrome, or movie from jellyfin, it may keep the metadata, but it definitely removes it from your visible library. Keeping (or rather displaying) intentionally deleted media is a bug, not a feature.
Author
Owner

@nichwall commented on GitHub (Jan 9, 2025):

I would still consider this a feature request rather than a bug. Just because other software does it a different way doesn't make it a bug. It would be a bug if ABS was designed to hide things, but it is designed to still show the media if it is missing so you are aware of it.

ABS is not designed as a server for frequently removing media. If you are frequently removing media from the server, I would recommend using a separate staging area to determine what file to keep before adding it to ABS.

@nichwall commented on GitHub (Jan 9, 2025): I would still consider this a feature request rather than a bug. Just because other software does it a different way doesn't make it a bug. It would be a bug if ABS was designed to hide things, but it is designed to still show the media if it is missing so you are aware of it. ABS is not designed as a server for frequently removing media. If you are frequently removing media from the server, I would recommend using a separate staging area to determine what file to keep before adding it to ABS.
Author
Owner

@2fst4u commented on GitHub (Jan 9, 2025):

Removing a file once every now and then doesn't mean it's frequent. It's perfectly reasonable to want to remove a file from the filesystem and have that represented in your library.

@2fst4u commented on GitHub (Jan 9, 2025): Removing a file once every now and then doesn't mean it's frequent. It's perfectly reasonable to want to remove a file from the filesystem and have that represented in your library.
Author
Owner

@advplyr commented on GitHub (Jan 9, 2025):

The reason that Abs marks an item as missing rather than delete it from the library is to prevent accidental data loss.

One case where this can happen is in file systems that aren't using inode values because then we don't have a way to detect if a folder gets renamed. If an item folder is renamed the path is no longer reachable and appears missing. If Abs were to delete that item the user would lose any metadata they set for it as well as any user progress.

Another case that we see often is users changing their volume paths in docker by mistake without realizing. At that point they see a bunch of missing items and revert to the correct path without losing their data.

Navidrome is not really comparable. There is no additional metadata stored, it is all from the audio files. There is no progress.
I'm not confident on Jellyfin but I believe you do lose your data if you rename things so that is one way to do it.

This seems like a situation where there is no one size fits all solution but let me know what you think

@advplyr commented on GitHub (Jan 9, 2025): The reason that Abs marks an item as missing rather than delete it from the library is to prevent accidental data loss. One case where this can happen is in file systems that aren't using inode values because then we don't have a way to detect if a folder gets renamed. If an item folder is renamed the path is no longer reachable and appears missing. If Abs were to delete that item the user would lose any metadata they set for it as well as any user progress. Another case that we see often is users changing their volume paths in docker by mistake without realizing. At that point they see a bunch of missing items and revert to the correct path without losing their data. Navidrome is not really comparable. There is no additional metadata stored, it is all from the audio files. There is no progress. I'm not confident on Jellyfin but I believe you do lose your data if you rename things so that is one way to do it. This seems like a situation where there is no one size fits all solution but let me know what you think
Author
Owner

@2fst4u commented on GitHub (Jan 9, 2025):

There's no reason that removing an item from the library should also remove progress data. It can still be held while still hiding it from the library if the item is re-added at some point in future.

@2fst4u commented on GitHub (Jan 9, 2025): There's no reason that removing an item from the library should also remove progress data. It can still be held while still hiding it from the library if the item is re-added at some point in future.
Author
Owner

@advplyr commented on GitHub (Jan 9, 2025):

How would you know it is the same item when it gets re-added in the future?

@advplyr commented on GitHub (Jan 9, 2025): How would you know it is the same item when it gets re-added in the future?
Author
Owner

@2fst4u commented on GitHub (Jan 9, 2025):

The same way ADB matches items to upstream metadata (Goodreads or whatever it is), each item is matched to unique books, readding items should match to that same book regardless of which underlying file it is.

Store progress data against the upstream database item ID, not the file.

The same way the other media players mentioned do it.

@2fst4u commented on GitHub (Jan 9, 2025): The same way ADB matches items to upstream metadata (Goodreads or whatever it is), each item is matched to unique books, readding items should match to that same book regardless of which underlying file it is. Store progress data against the upstream database item ID, not the file. The same way the other media players mentioned do it.
Author
Owner

@advplyr commented on GitHub (Jan 9, 2025):

For music, tv shows and music sure. Do you know of a provider we can use for books?

@advplyr commented on GitHub (Jan 9, 2025): For music, tv shows and music sure. Do you know of a provider we can use for books?
Author
Owner

@2fst4u commented on GitHub (Jan 9, 2025):

Goodreads? Doesn't ADB already use them? Where does the metadata all come from?

@2fst4u commented on GitHub (Jan 9, 2025): Goodreads? Doesn't ADB already use them? Where does the metadata all come from?
Author
Owner

@advplyr commented on GitHub (Jan 9, 2025):

I'm not sure what ADB is but Goodreads API is closed.

Abs supports fetching metadata from several providers but none of them are entirely reliable which is why Abs doesn't automatically pull metadata. That is a manual process.

Keep in mind that me and many others have been working on this project and discussing these exact topics for a few years now. When you say "there is no reason" why something isn't the way you think it should be there probably is.

@advplyr commented on GitHub (Jan 9, 2025): I'm not sure what ADB is but [Goodreads API is closed](https://www.goodreads.com/api). Abs supports fetching metadata from several providers but none of them are entirely reliable which is why Abs doesn't automatically pull metadata. That is a manual process. Keep in mind that me and many others have been working on this project and discussing these exact topics for a few years now. When you say "there is no reason" why something isn't the way you think it should be there probably is.
Author
Owner

@2fst4u commented on GitHub (Jan 9, 2025):

Sorry autocorrect started getting me, I mean abs. ADB is android debug bridge.

What do you mean it's a manual process? When a book is added that metadata shows without intervention right?

@2fst4u commented on GitHub (Jan 9, 2025): Sorry autocorrect started getting me, I mean abs. ADB is android debug bridge. What do you mean it's a manual process? When a book is added that metadata shows without intervention right?
Author
Owner

@dessalines commented on GitHub (Jan 10, 2025):

How would you know it is the same item when it gets re-added in the future?

Hash the file or folder when scanning it, and store the hash. MD5 or sha1 should be fine.

@dessalines commented on GitHub (Jan 10, 2025): > How would you know it is the same item when it gets re-added in the future? Hash the file or folder when scanning it, and store the hash. MD5 or sha1 should be fine.
Author
Owner

@averageyogi commented on GitHub (Jan 13, 2025):

When a book is added that metadata shows without intervention right?

Metadata embedded in/with the audio file(s) will be loaded if it exists, but the book won't be matched with an online provider and no additional metadata will be pulled automatically.

@averageyogi commented on GitHub (Jan 13, 2025): > When a book is added that metadata shows without intervention right? Metadata embedded in/with the audio file(s) will be loaded if it exists, but the book won't be matched with an online provider and no additional metadata will be pulled automatically.
Author
Owner

@LiamWilkinson commented on GitHub (Oct 12, 2025):

For a long time I thought there was a bug or missing functionality in the issues tab where I could not delete an audio book that I had removed from the file system. I intended to look at implementing this feature and pulled down the repository to start working on it. When I looked at the code I saw that one of the computed fields is userCanDelete.

<!-- issues page remove all button -->
<ui-btn v-if="isIssuesFilter && userCanDelete && !isBatchSelecting" ...

Seeing this code I switched to the root user and found the delete button to work perfectly fine, I just didn't know I didn't have the permissions required to delete. I suggest that this should be clarified with a UX improvement where the button is disabled and hovering over the button explains that the user doesn't have permissions to delete.

I would be happy to submit a PR implementing this change if people are interested.

@LiamWilkinson commented on GitHub (Oct 12, 2025): For a long time I thought there was a bug or missing functionality in the issues tab where I could not delete an audio book that I had removed from the file system. I intended to look at implementing this feature and pulled down the repository to start working on it. When I looked at the code I saw that one of the computed fields is `userCanDelete`. ``` <!-- issues page remove all button --> <ui-btn v-if="isIssuesFilter && userCanDelete && !isBatchSelecting" ... ``` Seeing this code I switched to the root user and found the delete button to work perfectly fine, I just didn't know I didn't have the permissions required to delete. I suggest that this should be clarified with a UX improvement where the button is disabled and hovering over the button explains that the user doesn't have permissions to delete. I would be happy to submit a PR implementing this change if people are interested.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2447