[Bug]: uploaded book merged into existing book #3168

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

Originally created by @jfrazx on GitHub (Dec 30, 2025).

What happened?

Uploaded a book using the web interface via Chrome. I only set a title, not an author or series, so I could control directory naming. Upload was successful; the book files exist within the prescribed directory. However, it appears the db entry for the book was not created and the files somehow merged (not physically) with an existing, entirely unrelated, book.

Re-scanning the existing book does not remove the uploaded book from its entry. I deleted the uploaded book (3 separate occasions) and attempted another upload and got the exact same results: resides within a distinct directory but somehow merges with the same existing book.

What did you expect to happen?

A unique book db entry.

Steps to reproduce the issue

  1. Upload book using the web interface

I don't imagine this will be easy, or even possible, to reproduce outside my environment (not that its particularly unique). I've uploaded many books in the same manner and never encountered any issues. This continues to plague this particular book, so I will assist in whatever way possible.

Audiobookshelf version

2.31.0 & 2.32.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

{"timestamp":"2025-12-30 11:17:31.403","source":"MiscController.js:83","message":"Uploading 27 files to /mnt/audiobooks/audiobooks/pirateaba-The_Wandering_Inn-Garden_of_Sanctuary-B0DRLJZX5G","levelName":"INFO","level":2}
{"timestamp":"2025-12-30 11:17:45.378","source":"LibraryItemScanner.js:135","message":"[LibraryItemScanner] Skipping watcher pending file \"/mnt/audiobooks/audiobooks/pirateaba-The_Wandering_Inn-Garden_of_Sanctuary-B0DRLJZX5G/16-Garden of Sanctuary - The Wandering Inn, Book 15-Chapter 12-[B0DRLJZX5G].m4b\" during scan of library item path \"/mnt/audiobooks/audiobooks/pirateaba-The_Wandering_Inn-Garden_of_Sanctuary-B0DRLJZX5G\"","levelName":"INFO","level":2}

Additional Notes

Uploading:
Image

Great success!
Image

Merged with another book:
Image

Originally created by @jfrazx on GitHub (Dec 30, 2025). ### What happened? Uploaded a book using the web interface via Chrome. I only set a title, not an author or series, so I could control directory naming. Upload was successful; the book files exist within the prescribed directory. However, it appears the db entry for the book was not created and the files somehow merged (not physically) with an existing, entirely unrelated, book. Re-scanning the existing book does not remove the uploaded book from its entry. I deleted the uploaded book (3 separate occasions) and attempted another upload and got the exact same results: resides within a distinct directory but somehow merges with the same existing book. ### What did you expect to happen? A unique book db entry. ### Steps to reproduce the issue 1. Upload book using the web interface I don't imagine this will be easy, or even possible, to reproduce outside my environment (not that its particularly unique). I've uploaded many books in the same manner and never encountered any issues. This continues to plague this particular book, so I will assist in whatever way possible. ### Audiobookshelf version 2.31.0 & 2.32.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 {"timestamp":"2025-12-30 11:17:31.403","source":"MiscController.js:83","message":"Uploading 27 files to /mnt/audiobooks/audiobooks/pirateaba-The_Wandering_Inn-Garden_of_Sanctuary-B0DRLJZX5G","levelName":"INFO","level":2} {"timestamp":"2025-12-30 11:17:45.378","source":"LibraryItemScanner.js:135","message":"[LibraryItemScanner] Skipping watcher pending file \"/mnt/audiobooks/audiobooks/pirateaba-The_Wandering_Inn-Garden_of_Sanctuary-B0DRLJZX5G/16-Garden of Sanctuary - The Wandering Inn, Book 15-Chapter 12-[B0DRLJZX5G].m4b\" during scan of library item path \"/mnt/audiobooks/audiobooks/pirateaba-The_Wandering_Inn-Garden_of_Sanctuary-B0DRLJZX5G\"","levelName":"INFO","level":2} ``` ### Additional Notes Uploading: <img width="1101" height="694" alt="Image" src="https://github.com/user-attachments/assets/db03272f-360e-4566-a478-77d611dda339" /> Great success! <img width="1125" height="417" alt="Image" src="https://github.com/user-attachments/assets/42543040-dcbb-4ce8-bb80-929d6c9bcfbb" /> Merged with another book: <img width="637" height="919" alt="Image" src="https://github.com/user-attachments/assets/f1d8d4fc-5aed-4188-8b57-223b278997cc" />
adam added the bug label 2026-04-25 00:14:02 +02:00
Author
Owner

@Vito0912 commented on GitHub (Dec 30, 2025):

The uploaded metadata.json is also correct/Did you made sure that it's not an mixnup with it.

The filepaths of the book look correct

@Vito0912 commented on GitHub (Dec 30, 2025): The uploaded metadata.json is also correct/Did you made sure that it's not an mixnup with it. The filepaths of the book look correct
Author
Owner

@jfrazx commented on GitHub (Dec 30, 2025):

It is correct.

cat pirateaba-The\ Wandering\ Inn-Garden\ of\ Sanctuary-\[B0DRLJZX5G\].metadata.json | grep asin -A5 -B5

{
  "asin": "B0DRLJZX5G",
  "asset_details": [],
  "authors": [
    {
      "asin": "B07XCYVYMW",
      "name": "pirateaba"
    }
  ],
  "available_codecs": [
    {
--
    "runtime_length_ms": 112389909,
    "runtime_length_sec": 112389
  },
  "ContentReference": {
    "acr": "CR!HJPP19T2WN4175YANTH1WZGH83R2",
    "asin": "B0DRLJZX5G",
    "codec": "mp4a.40.2",
    "content_format": "AAX_22_64",
    "content_size_in_bytes": 908646703,
    "file_version": "2",
    "marketplace": "...",
@jfrazx commented on GitHub (Dec 30, 2025): It is correct. ``` cat pirateaba-The\ Wandering\ Inn-Garden\ of\ Sanctuary-\[B0DRLJZX5G\].metadata.json | grep asin -A5 -B5 { "asin": "B0DRLJZX5G", "asset_details": [], "authors": [ { "asin": "B07XCYVYMW", "name": "pirateaba" } ], "available_codecs": [ { -- "runtime_length_ms": 112389909, "runtime_length_sec": 112389 }, "ContentReference": { "acr": "CR!HJPP19T2WN4175YANTH1WZGH83R2", "asin": "B0DRLJZX5G", "codec": "mp4a.40.2", "content_format": "AAX_22_64", "content_size_in_bytes": 908646703, "file_version": "2", "marketplace": "...", ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3168