Skip to content

[BUG] External EPUB renames create duplicate records and leave monitored originals missing #300

Open

Description

@threppo

Describe the bug

An external EPUB filename change within the same library root causes Rescan Folders to attach the file to a new book/edition record. The original monitored book then appears in Wanted → Missing even though the same matched edition remains in the library. A plain filesystem rename reproduces it; no BookOrbit integration is required.

To reproduce

  1. Import a correctly matched EPUB and enable ebook monitoring on its book.

  2. Rename the file without changing its contents or root:

    mv "/books/Author/Book/Original.epub" "/books/Author/Book/Renamed.epub"
  3. Run Rescan Folders on the library root.

  4. Inspect the original book's file association and Wanted → Missing.

Expected behavior

The renamed file remains on the original monitored book and edition. Genuine additional copies remain separate.

Actual behavior

The new path is attached to another book/edition record. The original has no files and is reported missing.

Controls

  • The filesystem-rename reproduction retained file contents and the same provider edition identity.
  • English title correction and author display reordering with automatic renaming disabled preserved IDs, path and the Missing list.
  • Polish metadata saves, including a work also present in English, preserved separate ownership with renaming disabled. Rename-on controls reproduced false Missing status for both languages.
  • A real BookOrbit metadata save also reproduces it when it renames the file.

System information

Linux, local filesystem, official Docker image, Chaptarr 0.9.965.0 (develop), standalone EPUBs.

Additional context

Related to #184 and #185; EPUB unit identity includes the directory and filename stem. A tested fix is prepared, and I would like to coordinate it with #185 before submitting a separate PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions