Repository navigation
feat(library): keep auto-organize shelves filed by their template - #59
Merged
Merged
Conversation
The shelf option promised files "are reorganized automatically after each scan", but it only applied when moving a book onto the shelf. Uploads, Z-Library downloads, files a scan found and serial volumes (built as slugs like pact-endgame.epub) all stayed at the top of the shelf. Auto-organize shelves are now filed by their template after every scan and a few seconds after edits (adding a book to a series, building a volume), together with the EPUB metadata sync. The organizer page starts from the shelf's saved template instead of a fixed default. Moves no longer overwrite a different file at the destination; an identical copy there is still replaced.
On a short desktop window the links below the fold were cut off: the sidebar is fixed at full height and its nav never scrolled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The organizer listed most of the Library shelf as needing a move, including serial volumes saved as slugs at the top of the shelf (
pact-endgame.epub). The shelf's "Auto-organize on scan" option said files "are reorganized automatically after each scan", but it only applied when a book was moved onto the shelf. Uploads, Z-Library downloads, files a scan found and newly built serial volumes were never filed.What
Testing
TestAutoOrganizecovers the shelf option off, filing intoSeries/NN - Title, a different file at the destination (kept, book not moved) and an identical copy (replaced). Fullgo vetandgo test -racepass.{series_path}/{sequence| - }{title}: 402 of 559 Library books would move, none to the same path. The KOReader shelf has 0 to move.After deploy
The Library shelf has auto-organize off and no saved template, so nothing moves until it's turned on in the shelf's settings. Once it is, the next sync files all 402 books.