Skip to content

Physical books cannot be moved between libraries #295

@dsmouse

Description

@dsmouse

What Went Wrong?

When attempting to move a physical book to a different library, the operation silently does nothing. No error is shown, the book stays in its original library.

How Can We Reproduce This?

Add a physical book (a book with no associated file — marked as physical)
Go to the book and attempt to move it to a different library
Observe that the book remains in the original library with no feedback

What Should Have Happened?

book changed what library it was

Screenshots or Error Messages (Optional)

No response

Any Ideas on How to Fix This? (Optional)

FileMoveService bails out early if bookFiles is null or empty:

if (bookEntity.getBookFiles() == null || bookEntity.getBookFiles().isEmpty()) {
log.warn("Book has no files to move: bookId={}", bookId);
return;
}
Physical books (is_physical = true) have no associated BookFileEntity records by design — they represent a book you own physically, not a file on disk. This guard treats them the same as a broken book-with-missing-files, so attempting to move a physical book between libraries silently does nothing.

The fix should check isPhysical before the early return and handle the physical book case separately — only the library/path association needs to be updated in the DB, with no file I/O required.

Your Setup

Grimmory v2.3.0
Kubernetes.

Before Submitting

  • I've searched existing issues and confirmed this bug hasn't been reported yet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions