[PR #4469] [MERGED] Fix scanner after deleting single file books #4459 #4260

Closed
opened 2026-04-25 00:19:02 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4469
Author: @advplyr
Created: 7/9/2025
Status: Merged
Merged: 7/9/2025
Merged by: @advplyr

Base: masterHead: fix_scanner_deleting_single_file_books


📝 Commits (1)

  • df1391d Fix scanner after deleting single file books #4459

📊 Changes

3 files changed (+11 additions, -1 deletions)

View changed files

📝 server/scanner/LibraryItemScanner.js (+5 -0)
📝 server/scanner/LibraryScanner.js (+5 -0)
📝 server/utils/fileUtils.js (+1 -1)

📄 Description

Brief summary

When deleting a single file book via the web ui the scanner re-adds the item

Which issue is fixed?

Fixes #4459

In-depth Description

Reproducible steps in #4459

The issue is single file books in the root folder don't run recurseFiles that is normally run on a folder getting scanned in. The single file book is not checked if it exists like a folder is.

This PR updates the scanner to add that check. It will also bail earlier when a scan runs after deleting a library item folder.

I also updated the file utils getIno to log a warning instead of an error since it is not an error when a file doesn't exist.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/4469 **Author:** [@advplyr](https://github.com/advplyr) **Created:** 7/9/2025 **Status:** ✅ Merged **Merged:** 7/9/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `fix_scanner_deleting_single_file_books` --- ### 📝 Commits (1) - [`df1391d`](https://github.com/advplyr/audiobookshelf/commit/df1391d93f6cf2a33b2420b0dc38f6ed40b6bcca) Fix scanner after deleting single file books #4459 ### 📊 Changes **3 files changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/scanner/LibraryItemScanner.js` (+5 -0) 📝 `server/scanner/LibraryScanner.js` (+5 -0) 📝 `server/utils/fileUtils.js` (+1 -1) </details> ### 📄 Description <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. If you do not follow this template, the PR may be closed without review. Please ensure all checks pass. If you are a new contributor, the workflows will need to be manually approved before they run. --> ## Brief summary When deleting a single file book via the web ui the scanner re-adds the item ## Which issue is fixed? Fixes #4459 ## In-depth Description Reproducible steps in #4459 The issue is single file books in the root folder don't run `recurseFiles` that is normally run on a folder getting scanned in. The single file book is not checked if it exists like a folder is. This PR updates the scanner to add that check. It will also bail earlier when a scan runs after deleting a library item folder. I also updated the file utils `getIno` to log a warning instead of an error since it is not an error when a file doesn't exist. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:19:02 +02:00
adam closed this issue 2026-04-25 00:19:03 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4260