2 Commits

Author SHA1 Message Date
e037996c5c Add ESC-to-stop, manga edit, R2 recompress, persistent browser session
- Persistent Chrome session: lazy-started, reused across all operations
  in one run (closed only on Quit). Eliminates per-command startup delay.
- ESC key gracefully stops Download/Upload/Sync after current chapter.
- Edit manga info: TUI form to update title/description/genre/status/cover
  in DB without re-syncing.
- R2 recompress: re-encode all webp images for a manga at quality 65 to
  reclaim storage. Skips files where new size is not smaller.
- Sync now refreshes title/description/genre on existing manga records,
  and saves all genres comma-separated (was only the first).
- Cover detection waits up to 8s for image to appear in DOM, with
  fallback selector.
- WebP encoding uses method=6 quality=75 for smaller files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 10:17:06 +08:00
fab3b413b8 Merge download.py and upload.py into unified manga.py with TUI
- Single interactive script (arrow-key TUI via simple-term-menu) replaces
  download.py, upload.py, and export_cookies.py
- Add sync command: streams new chapters site -> R2 directly without
  saving locally (uses RAM as cache)
- Add R2/DB management submenu (status, delete specific, clear all)
- Multi-select chapter picker with already-downloaded marked grayed out
- Chapter list fetched via /v2.0/apis/manga/chapterByPage with pagination
- Cover image captured from page network traffic (no extra fetch)
- Filter prefetched next-chapter images via DOM container count
- Chrome runs hidden via AppleScript on macOS (except setup mode)
- DB records only created after R2 upload succeeds (no orphan rows)
- Parallel R2 uploads (8 workers) with WebP method=6 quality=75
- Update CLAUDE.md to reflect new architecture
- Add requirements.txt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 08:56:05 +08:00