When migrating from older versions, new columns may have NULL values.
This adds a generic mechanism that scans all table models and fills
NULL values based on field defaults defined in SQLModel, improving
data consistency for upgraded databases.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Prevents startup from hanging indefinitely when downloader is
unreachable (e.g., due to proxy configuration). After 10 retries
(~5 min), program continues with an error log instead of blocking.
Fixes#955 (comment)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add size="small" to Resume, Pause, and Delete buttons in the
torrent action bar for consistent button heights.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When save_path ends with a season-only folder (Season 1, S01, 第1季),
display "Anime Name / Season 1" instead of just "Season 1"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Increase dialog width from 380px to 460px to fit all content
- Unify button heights across ab-button and ab-button-multi components
- small: 32px, normal: 36px, big: 44px
- Restructure ab-rule form layout with consistent gap spacing
- Fix Episode Offset row to keep input and button on same line (mobile)
- Add proper z-index layering for ab-bottom-sheet (backdrop: 100, container: 101, panel: 102)
- Add scoped styles for ab-setting dynamic-tags wrapper
- Add action button separator line in edit dialog
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add _is_duplicate() helper to check by (title_raw, group_name)
- Fix add_all() to skip existing records and deduplicate within batch
- Improve add() to use same deduplication logic
feat(ui): calendar page grouping and accessibility improvements
- Calendar page now groups bangumi by title+season (same as main page)
- Add rule selection popup for grouped bangumi with multiple rules
- Add skeleton loading animation on bangumi list page
- Fix popup z-index layering with CSS variable system
- Improve accessibility: 44px touch targets, focus-visible states, aria-labels
- Add i18n translations for rule selection
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Hide page title on mobile for cleaner layout
- Change group badge color to purple (primary color)
- Fix badge positioning at card corners with fit-content wrapper
- Increase grid padding to prevent badge clipping
- Center grid items for better alignment
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add bangumi archive and episode offset features
Archive Feature:
- Add archived field to Bangumi model with database migration (v4)
- Add archive/unarchive API endpoints (PATCH /bangumi/archive/{id})
- Add auto-archive for ended series via TMDB metadata refresh
- Add collapsible archived section in UI with visual styling
- Add archive/unarchive button in edit rule popup
Episode Offset Feature:
- Extract series_status and season_episode_counts from TMDB API
- Add suggest-offset API endpoint with auto-detection logic
- Apply offset in renamer gen_path() for episode numbering
- Add offset field with "Auto Detect" button in rule editor
- Look up offset from database when renaming files
The offset auto-detection calculates the sum of episodes from all
previous seasons (e.g., if S01 has 13 episodes, S02E18 → S02E05
with offset=-13).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: add changelog for bangumi archive and episode offset features
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Fix DetachedInstanceError in bangumi cache by expunging objects from
session before caching, preventing lazy loading errors when cached
objects are accessed from different request contexts
- Add database migration v3 to create passkey table for WebAuthn support,
fixing "no such table: passkey" error for users upgrading from older
versions
Closes#956
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Track RSS feed reachability during refresh cycles. Each feed now stores
connection_status (healthy/error), last_checked_at, and last_error.
The RSS management page shows a green "Connected" tag for healthy feeds
and a red "Error" tag with tooltip for failed feeds.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cover RSS engine, downloader, renamer, auth, notifications, search,
config, API endpoints, and end-to-end integration flows. When all
210 tests pass, the program's key behavioral contracts are verified.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Fix 'dict' object has no attribute 'files' in renamer by using dict
access for qBittorrent API responses and fetching file lists via
separate torrents/files endpoint
- Replace version-file-based migration with schema_version table to
reliably track and apply database migrations on every startup
- Add air_weekday column migration as versioned migration entry
- Add torrents_files method to QbDownloader and Aria2Downloader
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Upgrade VitePress from 1.0.0-rc.4 to 1.6.4 (stable)
- Update all dependencies (vue 3.5, typescript 5.6, @vue/tsconfig 0.5)
- Remove defunct Documate AI integration and google-analytics plugin
- Add Google Analytics via head config instead
- Translate all 25+ documentation pages from Chinese to English
- Add comprehensive REST API reference (docs/api/index.md)
- Add v3.2 changelog to sidebar navigation (fixes dead link)
- Update version string from v3.1 to v3.2
- Fix homepage changelog link to point to v3.2
- Update all WebUI screenshots with current v3.2 UI
- Add new screenshots: calendar view, bangumi poster wall
- Remove obsolete files: documate.json, deploy/windows.md, deploy/unix.md
- Update CSS variables for VitePress 1.6.x compatibility
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Add a multi-step setup wizard that guides new users through initial
configuration on first run. The wizard covers account credentials,
download client connection (with test), RSS source, media paths,
and optional notification setup.
Backend: new /api/v1/setup/ endpoints with sentinel file mechanism.
Frontend: 7-step wizard with validation and i18n (en/zh-CN).
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Old 3.1.x config files used different field names (sleep_time/times)
that were silently dropped during loading, causing user settings to
be lost on upgrade. Also fixes version migration dispatch that was
incorrectly calling 3.0→3.1 migration for all upgrades.
- Migrate old config fields: sleep_time→rss_time, times→rename_time
- Remove deprecated rss_parser fields (type, custom_url, token, enable_tmdb)
- Fix ENV_TO_ATTR mapping to use correct model field names
- Sync DEFAULT_SETTINGS with current Config model
- Add version-aware migration dispatch (from_31_to_32)
- Add comprehensive migration tests (config + database)
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Implement a comprehensive mobile-first UI redesign with touch-friendly
navigation, responsive data display, and proper device adaptation.
Key changes:
- Add 3-tier breakpoint system: mobile (<640px), tablet (640-1023px), desktop (1024px+)
- Create core mobile components: bottom-sheet, pull-refresh, swipe-container, data-list, adaptive-modal
- Redesign navigation: bottom nav with labels on mobile, mini sidebar on tablet
- Mobile-first layout with dvh units, safe area insets, and column-reverse flex
- Forms stack labels vertically on mobile, inputs go full-width
- Popups render as bottom sheets on mobile devices
- Bangumi grid uses CSS Grid with responsive minmax columns
- RSS page uses card-based data-list on mobile instead of NDataTable
- Config actions get safe area padding and full-width buttons on mobile/tablet
- Touch targets enforced at 44px minimum throughout
- Add sheet/overlay/swipe CSS transitions
- Topbar search visible on tablet (previously desktop-only)
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Previously the build pipeline only ran after a PR was merged to main.
Now it also runs as a test build (push: false) when a PR is opened or
updated from a *-dev branch, allowing build verification before merge.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
The database classes (BangumiDatabase, TorrentDatabase, RSSDatabase) use
synchronous Session, but tests were incorrectly using AsyncSession with
await calls, causing AttributeError on coroutine objects.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Rename "Experimental Setting" to "LLM Settings" with cleaner labels
- Replace jarring yellow warning banner with subtle themed notice
- Only show config fields when LLM is enabled (slide-fade transition)
- Add gpt-4o and gpt-4o-mini to model options
- Use scoped CSS instead of UnoCSS utility classes for the section
- Update i18n labels for both en and zh-CN
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix search store exports to match component expectations (inputValue,
bangumiList, onSearch) and transform data to SearchResult format
- Fix poster endpoint path check that incorrectly blocked all requests
- Add resolvePosterUrl utility to handle both external URLs and local paths
- Move tags into hover overlay on homepage cards and calendar cards
- Show title and tags on poster hover with dark semi-transparent styling
- Add downloader API, store, and page
- Update backend to async patterns and uv migration changes
- Remove .claude/settings.local.json from tracking
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change program.startup() to run via asyncio.create_task() so uvicorn
accepts connections immediately while downloader check runs in background.
Also add .claude/ project settings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Restyle config components (ab-container, ab-fold-panel, ab-label,
ab-setting) and all config-* setting panels to use the new design
system. Add empty state guides with setup steps for downloader and
player pages. Simplify log page layout.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add weekly broadcast schedule page showing subscribed anime grouped by
day-of-week. Backend fetches air_weekday from Bangumi.tv calendar API
and matches titles. Frontend displays responsive grid (desktop) and
vertical list (mobile). Edit popup moved to parent layout to fix
KeepAlive conflicts, and restyled with purple theme.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add minimal test server for passkey development (no downloader check)
- Add changelog for version 3.2 features
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The previous refactoring broke backward compatibility by converting
Database from Session-extending sync class to a standalone async class.
This broke RSSEngine, startup code, and auth flows.
- Restore Database(Session) with sync interface for legacy code
- Restore UserDatabase to sync methods
- Restore security/api.py and auth.py to sync calls
- Passkey API now uses async_session_factory directly
- PasskeyAuthStrategy uses async sessions independently
- Remove unused db_session from engine.py
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add secondary button type to ab-button with proper styling
- Fix small button sizing (min-width instead of fixed width)
- Add btn-content wrapper for icon+text alignment in buttons
- Add config-passkey panel to settings page
- Improve WebAuthn error messages with DOMException handling
- Prevent duplicate error messages from axios interceptor
- Fix Vite proxy to preserve Origin header for WebAuthn
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix aaguid type (str not bytes) in registration verification
- Fix missing credential_backup_eligible field (use credential_device_type)
- Remove invalid credential_id param from verify_authentication_response
- Fix origin detection to use browser Origin header for WebAuthn verification
- Add async database engine support (aiosqlite) for passkey operations
- Convert UserDatabase to async-compatible with sync/async session detection
- Update Database class to support both sync and async context managers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add passkey login as alternative authentication method
- Support multiple passkeys per user with custom names
- Backend: WebAuthn service, auth strategy pattern, API endpoints
- Frontend: passkey management UI in settings, login option
- Fix: convert downloader check from sync requests to async httpx
to prevent blocking the event loop when downloader unavailable
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>