From c2261ece0a759a224e21216e9ddb756befe63006 Mon Sep 17 00:00:00 2001
From: Estrella Pan
-
+
diff --git a/docs/changelog/3.3.md b/docs/changelog/3.3.md new file mode 100644 index 00000000..c3879f35 --- /dev/null +++ b/docs/changelog/3.3.md @@ -0,0 +1,65 @@ +# [3.3] - Unreleased + +## Backend — Architecture + +The backend went through an architecture refactor focused on modernization and robustness (REST API behavior is unchanged): + +### Changes + +- Database layer fully asynchronous: repositories and `Database` migrated to `sqlite+aiosqlite` (WAL + busy_timeout enabled), removing synchronous DB calls from the event loop +- Composition over inheritance: `Database` no longer subclasses `Session`; `RSSEngine`/`TorrentManager`/`Renamer`/`SeasonCollector`/`SearchTorrent`/`RSSAnalyser` now take their dependencies via constructor injection +- The `Program` god object was replaced by the lifespan composition root `AppContext` plus a generic `PeriodicTask`/`Scheduler`; startup is now awaited (a failed migration aborts startup explicitly), and downloader retries run as supervised background tasks +- Migrations are now table-driven (`database/migrations.py`, declarative `already_applied` guards), replacing the hardcoded per-version if-chain; version numbers and SQL are unchanged, so existing databases upgrade as before +- Downloaders implement a `Downloader` Protocol with capability flags; aria2's partial support is now declared honestly instead of crashing the loop with `NotImplementedError` +- Config changes now go through `AppContext.reload_settings()` uniformly (this restores re-application of RSS rules) +- Security: session storage gained expiry cleanup, token comparison switched to constant-time comparison + +### Features + +- qBittorrent client session reuse: the login session is reused across operations with automatic re-authentication on 401/403, cutting redundant logins significantly (#1039, #900) +- Configurable TMDB / bgm.tv API base URLs, for users behind restrictive networks (#1040, #1042) + +### Bugfixes + +- Fixed an httpx connection pool leak on downloader authentication failure +- Fixed OpenAI parsing blocking the event loop (switched to `AsyncOpenAI`) +- Fixed `build_rss_rule`'s `mustNotContain` splitting the filter string by character instead of OR-ing each item as a regex term +- Removed a large amount of dead code (the old notification stack, the SIGALRM decorator, empty transmission stubs, etc.) + +## Backend + +### Features + +- Added a `Security` config model, supporting login IP allowlists, MCP IP allowlists, and Bearer Token authentication +- Added an IP allowlist check middleware for the login endpoint (`check_login_ip`) +- The MCP security middleware is now configurable: supports CIDR allowlist + Bearer Token dual authentication +- Auth endpoints support `Authorization: Bearer` tokens, bypassing cookie login +- Added a manual air-weekday API for bangumi (`PATCH /api/v1/bangumi/{id}/weekday`), supporting a lock to prevent the calendar refresh from overwriting it +- Database migration v9: added a `weekday_locked` column to the `bangumi` table + +### Bugfixes + +- Fixed a qBittorrent downloader SSL issue: decoupled HTTPS protocol selection from certificate verification, so self-signed certificates no longer break the connection (#923) +- Fixed a logic error in `torrents_rename_file`'s rename-verification loop where `continue` should have been `break` +- Fixed the config API's `_sanitize_dict` to redact only string values, avoiding mishandling of non-string fields + +### Changes + +- Refactored the auth module: extracted a shared `_issue_token` method, removing 3 duplicated JWT-issuing code paths +- `get_current_user` simplified to three-tier authentication (DEV bypass → Bearer Token → Cookie JWT) +- `LocalNetworkMiddleware` renamed to `McpAccessMiddleware`, now reads its allowlist from config instead of a hardcoded RFC 1918 range + +### Tests + +- Added 101 unit tests covering security, auth, config, downloader, and the MockDownloader module + +## Frontend + +### Features + +- Added calendar drag-and-drop scheduling: drag an "Unknown" series into a weekday column to set and lock its air day + - Shows a purple pin icon after dropping, with a cancel button on hover + - Locked series are not overwritten by calendar refreshes + - Uses vuedraggable for smooth drag animation +- Added a security settings component (`config-security.vue`) for configuring IP allowlists and tokens in the WebUI +- Added `Security` frontend type definitions and initial config diff --git a/docs/resource/docker-compose/AutoBangumi/docker-compose.yml b/docs/resource/docker-compose/AutoBangumi/docker-compose.yml index 16423072..591d45da 100644 --- a/docs/resource/docker-compose/AutoBangumi/docker-compose.yml +++ b/docs/resource/docker-compose/AutoBangumi/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: AutoBangumi: image: "ghcr.io/estrellaxd/auto_bangumi:latest" @@ -15,6 +13,6 @@ services: - 223.5.5.5 environment: - TZ=Asia/Shanghai - - PGID=$(id -g) - - PUID=$(id -u) + - PGID=${PGID:-1000} + - PUID=${PUID:-1000} - UMASK=022 \ No newline at end of file