Skip to content

[Feature] Allow books to be renamed into folders that already exist #523

Description

@ponchohoncho

What's your idea?

I want my ebooks and audiobooks to coexist, for the purposes of creating readaloud epub3 files. My main books library is a folder-as-a-book, and my expectation was that we would put all the versions of that book into that folder: epub, mobi, pdf, m4b, etc.

If on disk, I have the ebook version of an audiobook I already have, when I try to rename the ebook to match the metadata/filename of the audiobook, I'm able to update the audiobook, but the error I get on renaming says

"target folder already exists on disk"

I know, I want it to use that folder, please. Can we have an option to merge renamed files into folders that already exist? I think that the renamer just stops when it sees that the destination-named folder exists, not understanding that it can just move the file inside it into the destination folder.

What problem does it solve?

Allows us to really do folder-as-a-book more easily when organizing/merging libraries

Anything else? (optional)

Logs from a rename I tried to do.

Jul 03 09:06:46 bookorbit node[16679]: {"level":30,"time":1783087606775,"pid":16679,"hostname":"bookorbit","req":{"id":"req-3c8","method":"PATCH","url":"/api/v1/books/1204/metadata-and-locks?syncFileWrite=true"},"context":"BookService","msg":"[book.update_metadata_and_locks] [start] bookId=1204 userId=1 metadataFields=12 lockFields=0 - metadata and lock update started"}
Jul 03 09:06:47 bookorbit node[16679]: {"level":30,"time":1783087607215,"pid":16679,"hostname":"bookorbit","req":{"id":"req-3c8","method":"PATCH","url":"/api/v1/books/1204/metadata-and-locks?syncFileWrite=true"},"context":"FileWriteService","msg":"[file_write.write] [end] bookId=1204 format=pdf triggeredBy=sync userId=1 dryRun=false durationMs=407 status=success fieldsWritten=11 - file write completed"}
Jul 03 09:06:47 bookorbit node[16679]: {"level":30,"time":1783087607215,"pid":16679,"hostname":"bookorbit","req":{"id":"req-3c8","method":"PATCH","url":"/api/v1/books/1204/metadata-and-locks?syncFileWrite=true"},"context":"FileRenameService","msg":"[file.rename] [start] bookId=1204 userId=1 force=false - file rename started"}
Jul 03 09:06:47 bookorbit node[16679]: {"level":40,"time":1783087607229,"pid":16679,"hostname":"bookorbit","req":{"id":"req-3c8","method":"PATCH","url":"/api/v1/books/1204/metadata-and-locks?syncFileWrite=true"},"context":"FileRenameService","msg":"[file.rename] [end] bookId=1204 userId=1 durationMs=14 status=skipped reason=\"target folder already exists on disk\" newPath=\"/books/Clayton M. Christensen/How Will You Measure Your Life_ (2012)/How Will You Measure Your Life_ - Clayton M. Christensen.pdf\" - rename skipped: target already exists on disk"}
Jul 03 09:06:47 bookorbit node[16679]: {"level":30,"time":1783087607258,"pid":16679,"hostname":"bookorbit","req":{"id":"req-3c8","method":"PATCH","url":"/api/v1/books/1204/metadata-and-locks?syncFileWrite=true"},"context":"BookService","msg":"[book.update_metadata_and_locks] [end] bookId=1204 durationMs=483 scalarFields=9 customMetadataUpdated=false lockFields=0 - metadata and lock update completed"}
Jul 03 09:07:09 bookorbit node[16679]: {"level":30,"time":1783087629975,"pid":16679,"hostname":"bookorbit","req":{"id":"req-3cc","method":"POST","url":"/api/v1/books/1204/write-and-rename"},"context":"FileWriteService","msg":"[file_write.write] [end] bookId=1204 format=pdf triggeredBy=sync userId=1 dryRun=false durationMs=411 status=success fieldsWritten=11 - file write completed"}
Jul 03 09:07:09 bookorbit node[16679]: {"level":30,"time":1783087629975,"pid":16679,"hostname":"bookorbit","req":{"id":"req-3cc","method":"POST","url":"/api/v1/books/1204/write-and-rename"},"context":"FileRenameService","msg":"[file.rename] [start] bookId=1204 userId=1 force=true - file rename started"}
Jul 03 09:07:09 bookorbit node[16679]: {"level":40,"time":1783087629986,"pid":16679,"hostname":"bookorbit","req":{"id":"req-3cc","method":"POST","url":"/api/v1/books/1204/write-and-rename"},"context":"FileRenameService","msg":"[file.rename] [end] bookId=1204 userId=1 durationMs=11 status=skipped reason=\"target folder already exists on disk\" newPath=\"/books/Clayton M. Christensen/How Will You Measure Your Life_ (2012)/How Will You Measure Your Life_ - Clayton M. Christensen.pdf\" - rename skipped: target already exists on disk"}

Want to help?

I can help test and give feedback

Before submitting

  • I've searched existing issues and this hasn't been requested yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature request or capability proposal.releasedIssue or PR is included in a released version.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions