Skip to content

Align reading statuses with MangaBaka, add auto-add sync, fix rating scale#24

Merged
gregoryn22 merged 1 commit into
masterfrom
claude/interesting-cori-86bdd4
May 26, 2026
Merged

Align reading statuses with MangaBaka, add auto-add sync, fix rating scale#24
gregoryn22 merged 1 commit into
masterfrom
claude/interesting-cori-86bdd4

Conversation

@gregoryn22
Copy link
Copy Markdown
Owner

Summary

  • Reading status rename: on_holdpaused across all layers (DB migration, backend validation, frontend dropdowns/pills/chips, CSS, export, sync maps). on_hold no longer exists anywhere.
  • New statuses: considering fully wired in (was half-present); rereading added to all dropdowns and filter pills that were missing it.
  • MB auto-add setting: new mb_auto_add toggle — when enabled, a series not found in the user's MB library during sync/push is added via POST /v1/my/library/{id} instead of silently skipped. Applies to live sync, import sync, and Push All.
  • Rating scale bug fixed: app stores ratings 0–10 but MB expects 0–100. Push now multiplies ×10; pull now checks <= 100.0 and divides ÷10 with 0.5-step snap. Export also fixed. Was silently wrong before.
  • MB series lifecycle: metadata refresh now handles merged (updates mb_linked_id, re-fetches with new ID) and deleted (skips with warning log).
  • Pagination: pull_library() follows pagination.next URL instead of manual page math.
  • Search limit: search() now sends limit=20 (was defaulting to 10).
  • Scope check: test_mb_sync now returns missing_write_scope: true if the PAT lacks library.write; frontend shows a warning.

Files changed

File What changed
app/database.py Seed mb_auto_add=false; data migration on_hold → paused
app/mangabaka.py search() limit param
app/mangabaka_sync.py add_to_library() POST; fixed push_entry rating ×10; fixed pull_library pagination; considering in _STATE_MAP; paused replaces on_hold
app/notifier.py Comment: "on hold" → "paused"
app/routers/export.py _STATUS_MAP updated; rating export ×10 fix; considering added
app/routers/series.py _VALID_READING_STATUSES updated; _bg_sync_to_mb + _bg_sync_import_to_mb check mb_auto_add
app/routers/settings.py mb_auto_add in EXPOSED_KEYS + model; mb_pull rating fix; test_mb_sync scope check; push-all status exposes added count
app/scheduler.py ACTIVE_STATUSES uses paused; push-all tracks added counter; merged/deleted series lifecycle in metadata refresh
static/css/components.css .chip-hold.chip-paused
static/index.html All status dropdowns, filter pills, chips, help text updated; mb_auto_add toggle added to MB settings block
static/js/app.js mb_auto_add default; push-all toast shows added count; test-sync toast warns on missing scope

Reviewer notes

  • The DB migration (UPDATE tracked_series SET reading_status = 'paused' WHERE reading_status = 'on_hold') runs inside the existing engine.begin() block at startup — idempotent and safe on an already-migrated DB.
  • add_to_library sends all progress fields in one POST body so no follow-up PATCH is needed.
  • MB rating field is 0–100 integer; internal user_rating is 0–10 float. The ×10 / ÷10 conversion now happens at every boundary (push, pull, export).

🤖 Generated with Claude Code

…ing scale

Reading status changes:
- Rename 'on_hold' → 'paused' everywhere (aligns with MB state enum)
- Add 'considering' status (new; mirrors MB's considering state)
- Add 'rereading' to all dropdowns and filter pills that were missing it
- DB migration renames existing 'on_hold' rows to 'paused' on startup
- chip-hold CSS class renamed to chip-paused

MangaBaka sync improvements:
- Add mb_auto_add setting: when enabled, series not in MB library are
  POST'd to add them instead of silently skipped (live sync, import, push-all)
- Fix rating scale bug: app stores 0–10 but MB expects 0–100; multiply ×10
  on push, divide ÷10 (with 0.5 snap) on pull — was silently wrong before
- Fix mb_pull rating range check: was <= 10.0 (dropped all ratings > 10)
- Fix mb_pull missing /10 conversion (ratings stored at wrong scale)
- Fix export rating: was sending raw 0–10 value instead of ×10
- Fix 'considering' state: now in _STATE_MAP, _VALID_READING_STATUSES,
  export _STATUS_MAP, and reverse pull map
- Handle MB series lifecycle: 'merged' → update mb_linked_id and re-fetch;
  'deleted' → skip metadata update with warning log
- pull_library() now follows pagination.next URL instead of manual page math
- search() now sends limit=20 (was defaulting to 10)
- test_mb_sync returns missing_write_scope bool; frontend warns if absent

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gregoryn22 gregoryn22 merged commit 4f2f503 into master May 26, 2026
1 check passed
@gregoryn22 gregoryn22 deleted the claude/interesting-cori-86bdd4 branch May 27, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant