Commit Graph

1786 Commits

Author SHA1 Message Date
Estrella Pan
339166508b test(e2e): add comprehensive E2E integration test suite
67 tests across 11 phases exercising the full AutoBangumi workflow
against Docker infrastructure (qBittorrent + mock RSS server).
Covers setup wizard, auth, config, RSS CRUD, bangumi, downloader,
program lifecycle, log, search, notification, and credential updates
with both happy paths and error conditions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 11:44:03 +01:00
Estrella Pan
6cbe7090fe fix(database): clean up torrent records on bangumi deletion
When a bangumi was deleted, its associated Torrent records remained in
the database. This prevented re-downloading the same torrents if the
user re-added the anime, because check_new() deduplicates by URL and
would filter out the orphaned records.

Now delete_rule() removes Torrent records before deleting the Bangumi,
so re-adding the same anime correctly treats those torrents as new.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:45:58 +01:00
Estrella Pan
9d4bd48ce5 test(parser): expand coverage for raw, torrent, and path parsers
Add 13 new test cases across three parser test files:
- raw_parser: Chinese 第二季, 2160p resolution, bracketed Season N, multi-group with Chinese punctuation, English-only title
- torrent_parser: EP format, tc/zh-tw subtitle, no-language subtitle (ValidationError), multi-level path, [NNvN] version suffix
- path_parser: season=2/no-offset, large positive offset, offset yielding exactly Season 1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 20:48:53 +01:00
Estrella Pan
fb2dd17c0c feat(mcp): add MCP server for LLM tool integration via SSE
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.2.3-beta.5
2026-02-22 16:42:39 +01:00
Estrella Pan
ba263e0f69 Merge branch 'claude/inspiring-williams' into 3.2-dev
fix(ui): align notification settings with project design system

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:44:22 +01:00
Estrella Pan
b570073000 fix(ui): align notification settings with project design system
Replace non-existent ab-dialog with ab-popup for proper modal behavior,
use ab-button/ab-label components and consistent spacing/styles matching
other settings panels (search-provider, proxy).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:44:11 +01:00
Estrella Pan
a88e01d3f5 chore: bump version to 3.2.3-beta.4
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.2.3-beta.4
2026-02-22 14:11:34 +01:00
Estrella Pan
5f604e94fd perf(logging): optimize logging with rotation, async I/O, and lazy formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:10:56 +01:00
Estrella Pan
c173454a67 chore: bump version to 3.2.3-beta.3
fix: Episode 0 incorrectly renamed to E01 (#977)
fix: NoneType error in match_list when title_raw is null (#976)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.2.3-beta.3
2026-01-30 13:13:15 +01:00
Estrella Pan
48bf570697 feat(notification): redesign system to support multiple providers
- Add NotificationProvider base class with send() and test() methods
- Add NotificationManager for handling multiple providers simultaneously
- Add new providers: Discord, Gotify, Pushover, generic Webhook
- Migrate existing providers (Telegram, Bark, Server Chan, WeChat Work) to new architecture
- Add API endpoints for testing providers (/notification/test, /notification/test-config)
- Auto-migrate legacy single-provider configs to new multi-provider format
- Update WebUI with card-based multi-provider settings UI
- Add test button for each provider in settings
- Generic webhook supports template variables: {{title}}, {{season}}, {{episode}}, {{poster_url}}

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:58:42 +01:00
Estrella Pan
5eb21bfcfa chore: bump version to 3.2.3-beta.2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.2.3-beta.2
2026-01-28 20:27:39 +01:00
Estrella Pan
07093dda8d fix(parser): handle torrent names without brackets in get_group
Fixes IndexError when parsing torrent names that don't follow the
standard [Group] format. Now returns empty string instead of crashing.

Fixes #973

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:25:13 +01:00
EstrellaXD
99c8764484 perf: optimize renamer with batch database queries and reduced blocking
- Add batch offset lookup to reduce N database connections to 1-3 per cycle
- Add search_by_qb_hashes() and search_ids() for batch queries
- Throttle pending rename cache cleanup to once per minute max
- Use exponential backoff for rename verification (0.1s->0.2s->0.4s)
- Skip verification for subtitle renames to reduce latency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:55:20 +01:00
Estrella Pan
789c02f7f4 fix(docs): convert all relative image paths to absolute paths
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 21:05:05 +01:00
Estrella Pan
d691cb6d80 fix(docs): use absolute paths for images in VitePress
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 21:02:27 +01:00
Estrella Pan
b33ec01363 fix: improve rename reliability and add torrent tagging API
- Fix qBittorrent rename verification (verify file actually renamed)
- Add pending rename cooldown to prevent spam when rename delayed
- Add torrent tagging API for accurate offset lookup
- Add auto calendar refresh every 24 hours
- Fix frontend error handling (don't logout on server errors)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 20:54:04 +01:00
EstrellaXD
b0c00598a5 chore: bump version to 3.2.2 2026-01-27 11:05:36 +01:00
EstrellaXD
e0cca519b5 fix(ci): extract version number from PR title
The workflow was using the full PR title (e.g., 'Release 3.2.1') as the
version string, causing Docker tags and release creation to fail.

Now extracts just the version number (X.Y.Z or X.Y.Z-suffix) from the
PR title, handling formats like 'Release 3.2.1', 'v3.2.1', or '3.2.1'.
2026-01-27 10:59:21 +01:00
EstrellaXD
418e2b443f Merge origin/main into 3.2-dev 2026-01-27 10:42:54 +01:00
EstrellaXD
f06ed41c0d chore: bump version to 3.2.1 2026-01-27 10:40:35 +01:00
EstrellaXD
f842c53dca fix(docs): move images to public folder for VitePress serving
Images referenced with absolute paths in VitePress frontmatter (e.g.,
/image/icons/rss.png) must be in the public folder to be served correctly.
This fixes missing feature icons on the homepage.

A symlink is created at docs/image -> public/image to maintain compatibility
with relative paths used in markdown files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 10:39:31 +01:00
Estrella Pan
0f01f1dd35 Merge pull request #964 from EstrellaXD/docs/i18n-chinese-default
docs: add i18n support with Chinese as default language
2026-01-27 10:36:50 +01:00
Estrella Pan
03bf265651 docs: add i18n support with Chinese as default language
- Configure VitePress locales with zh-CN as root and en-US as /en/
- Translate all documentation to Chinese (31 files)
- Create English documentation under /en/ directory
- Add Chinese UI labels for navigation and pagination
- Language switcher now available in site header

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>
2026-01-27 07:57:13 +01:00
Estrella Pan
7e9f3a707a fix(renamer): only log rename operations that actually succeed
Previously, the rename log message was printed before checking if the
qBittorrent API call succeeded. This caused log spam when rename
operations failed (e.g., due to 409 conflicts or network errors) since
the same file would be attempted again on the next cycle.

Now the log message is only printed after confirming the rename
succeeded, reducing noise in the logs.

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>
2026-01-27 07:06:18 +01:00
Estrella Pan
24f1f72941 fix(renamer): improve episode offset warning messages (#962)
The warning "Episode offset 0 would result in negative episode" was
misleading and caused log spam. The actual issue was either:
1. Parsed episode was 0 or negative (parsing failure or special episode)
2. A negative offset would make a valid episode negative

Changes:
- Differentiate between parsing issues vs offset issues in log messages
- Use debug level for parsed episode issues (likely special episodes)
- Keep warning level only for actual offset problems
- Include original episode value in warning for better debugging
- Handle edge case where parsed episode is 0 by falling back to 1

Fixes #962

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>
2026-01-27 06:46:14 +01:00
Estrella Pan
3146029d0b fix: add socksio dependency to support SOCKS proxy (#961)
When users have a SOCKS proxy configured (via HTTP_PROXY or ALL_PROXY
environment variables), httpx's AsyncClient automatically tries to use
it but fails without the socksio package installed.

Changed httpx dependency from httpx>=0.25.0 to httpx[socks]>=0.25.0 to
include the socksio package as an extra dependency.

Fixes #961

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>
2026-01-27 06:42:03 +01:00
Estrella Pan
5f3efb0079 Merge pull request #960 from EstrellaXD/docs-update 2026-01-26 23:40:22 +01:00
Estrella Pan
ae129e7764 docs: update 3.2 changelog with beta.11-13 features and add Chinese version
- Added offset detection suggested values display
- Added season offset folder path fix
- Added search panel redesign details (filters, tags, expand/collapse)
- Added mobile UI bugfixes (settings overflow, top bar, search modal, etc.)
- Created Chinese translation of 3.2 changelog

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>
2026-01-26 23:24:04 +01:00
Estrella Pan
506d1d3f28 docs: add SECURITY.md for vulnerability reporting
Add security policy with bilingual instructions (English/Chinese) for
reporting vulnerabilities via GitHub Private Vulnerability Reporting
or email contact.

Closes #879

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>
2026-01-26 23:23:35 +01:00
Estrella Pan
5810d5e0ed docs: update README preview image to bangumi-list
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>
2026-01-26 23:10:57 +01:00
Estrella Pan
bde73e640d docs: update README preview image to bangumi-list
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>
2026-01-26 23:10:12 +01:00
Estrella Pan
eda98db94a Merge pull request #955 from EstrellaXD/3.2-dev
3.2.0
3.2.0
2026-01-26 21:06:51 +01:00
Estrella Pan
d288994916 fix(test): mock VERSION in setup test to test non-dev config check logic 2026-01-26 21:03:34 +01:00
Estrella Pan
6823c034f0 docs: add changelog for search panel redesign (beta.13) 2026-01-26 21:00:08 +01:00
Estrella Pan
c0480fe028 feat(search): redesign search panel with chip cloud filters
- Add filter section with group, resolution, subtitle, season categories
- Implement multi-select filters with smart disabling for incompatible options
- Display result variant tags as non-clickable colored pills
- Unify tag styling (pill shape, 12px font) across filters and results
- Add expand/collapse for filter categories and variant overflow
- Normalize tag values (resolution: FHD/HD/4K, subtitle: 简/繁/双语)
- Calculate poster height to match 4 rows of variant chips (168px)
- Add click-outside-to-close for modal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:59:28 +01:00
Estrella Pan
27a056d01a fix(login): unify input height and font size with buttons
Standardize form element dimensions for visual consistency:
- Input height: 48px → 44px (matches button height)
- Input font: 16px → 14px (consistent with form elements)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:14:38 +01:00
Estrella Pan
5ab38c335d refactor(setup): remove syncMediaPath call from downloader step
Path is now synced directly through downloaderData.path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:12:05 +01:00
Estrella Pan
9b27621861 feat(setup): improve dev mode support for setup wizard testing
- Allow setup in dev mode even if settings differ from defaults
- Add mock downloader type for development testing
- Only check sentinel file in dev mode for need_setup status

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:11:48 +01:00
Estrella Pan
2fb82a5a27 refactor(setup): remove redundant media library step from wizard
The media library path is now taken directly from the downloader path
field, eliminating the unnecessary separate step.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:11:44 +01:00
Estrella Pan
4488a89391 fix(player): normalize URLs without protocol to prevent relative path redirects
URLs entered without http:// or https:// were being treated as relative
paths by the browser. Added normalizeUrl() function that prepends http://
when no protocol is present.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:11:40 +01:00
Estrella Pan
8d09b0cecc fix(i18n): add missing translations for selectAll and theme toggle
- Add common.selectAll and common.items translations
- Add theme.light and theme.dark translations
- Update ab-mobile-nav to use i18n for theme toggle label
- Remove hardcoded fallback in ab-data-list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 19:51:43 +01:00
EstrellaXD
47a10d5828 fix: suppress verbose httpx HTTP request logs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 17:08:29 +01:00
EstrellaXD
359b3e5253 fix: resolve all deprecation warnings
Pydantic V2:
- Replace @validator with @field_validator in models/config.py
- Replace .dict() with .model_dump() in Config, Settings, and BangumiDatabase
- Replace .parse_obj() with .model_validate() in Settings and tests
- Replace Field(example=) with Field(json_schema_extra=) in response models

Datetime:
- Replace datetime.utcnow() with datetime.now(timezone.utc) in jwt.py
- Update factories.py to use timezone-aware datetime

FastAPI:
- Migrate from deprecated @router.on_event() to lifespan context manager
- Move startup/shutdown handlers from program.py to main.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:34:19 +01:00
EstrellaXD
7b5c8d9ac5 chore: upgrade Python version to 3.13
- Update requires-python to >=3.13 in pyproject.toml
- Update ruff and black target versions to py313
- Update Dockerfile to use python:3.13-alpine
- Add explicit Python 3.13 setup in CI workflow
- Regenerate uv.lock for Python 3.13

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:30:25 +01:00
EstrellaXD
f22f5c657f fix(test): correct TypeScript types in frontend test mocks
- Use RSS type instead of non-existent RSSItem/RSSResponse
- Add expire field to mockLoginSuccess
- Replace offset with episode_offset/season_offset in mockBangumiAPI
- Add needs_review_reason field to mockBangumiAPI
- Add missing RSS fields (connection_status, last_checked_at, last_error)
- Fix generic types in test utilities

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:24:31 +01:00
EstrellaXD
a137b54b85 test: add comprehensive API tests for backend and frontend
Backend:
- Add API test files for auth, program, downloader, config, log, bangumi extended, search, and passkey endpoints
- Update conftest.py with new fixtures (app, authed_client, unauthed_client, mock_program, mock_webauthn, mock_download_client)
- Update factories.py with make_config and make_passkey functions

Frontend:
- Setup vitest testing infrastructure with happy-dom environment
- Add test setup file with mocks for axios, router, i18n, localStorage
- Add mock API data for testing
- Add tests for API logic, store logic, hooks, and basic components
- Add @vue/test-utils and happy-dom dev dependencies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:20:39 +01:00
EstrellaXD
3770d33f77 chore: add beta release notes generator script
Generates concise release notes showing only changes between beta versions:
- Auto-detects previous beta tag
- Groups commits by type (feat, fix, perf, docs)
- Excludes chore/refactor/test commits from notes
- Includes link to full changelog comparison

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:14:01 +01:00
EstrellaXD
4e2a22aba5 chore: bump version to 3.2.0-beta.13
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.2.0-beta.13
2026-01-26 15:56:49 +01:00
EstrellaXD
3f4f3a141c feat(database): add title alias system for mid-season naming changes
When subtitle groups change their naming convention mid-season (e.g.,
"LoliHouse" → "LoliHouse&动漫国"), AutoBangumi was creating duplicate
entries. This adds a title alias system that:

- Detects semantic duplicates (same official_title, dpi, subtitle,
  source, and similar group name)
- Merges them as aliases instead of creating new entries
- Updates match_torrent() and match_list() to check aliases
- Adds title_aliases field to Bangumi model (JSON list)
- Includes migration v8 for the new column
- Adds 10 new tests for the feature
- Fixes cache invalidation bug in disable_rule()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:44:44 +01:00
EstrellaXD
0ba508cd0b fix(webui): prevent empty search and cancel search on modal close
- Add input validation to prevent search when keyword is empty or whitespace
- Close EventSource connection when search modal is closed to stop ongoing searches

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:42:40 +01:00