Skip to content

πŸŒ™3.3.0-beta.1

Pre-release
Pre-release

Choose a tag to compare

@EstrellaXD EstrellaXD released this 03 Jul 06:14

[3.3] β€” Beta

3.3 is the largest AutoBangumi release in a while: a fully async backend architecture, aria2 promoted to a first-class download backend, movie/OVA/special support, per-bangumi release preferences, a hardened security stack, and a WebUI that updates over SSE instead of polling. REST API behavior is backward-compatible; existing databases upgrade automatically (migrations v9–v14).

Highlights

  • aria2 is now a first-class backend β€” real add/query/rename/manage support with honest duplicate detection (reconciled against aria2's live state), collision-safe filesystem renames, and offset resolution via a persisted gid↔bangumi mapping. Previously aria2 could only add torrents; organization silently did nothing.
  • Movies / OVA / Specials β€” the parser recognizes ε‰§εœΊη‰ˆ/εŠ‡ε ΄η‰ˆ/η”΅ε½±η‰ˆ/Movie and OVA/OAD/SP/Special tokens (episode_type); movies are organized as flat Title (Year) folders with TMDB search/movie fallback, specials go to Season 0. Multi-file movie torrents keep distinct filenames (largest file gets the clean name).
  • Per-bangumi release preference β€” set a preferred subtitle group and/or resolution per series; when multiple groups release the same episode, only the best match is downloaded instead of all of them.
  • Notifications beyond "new episode" β€” typed events for RSS feed failures (on state change, not every tick), download-add failures, and offset needs-review; {{title}}-style message templates now work for every provider, not just webhook.
  • Offset suggestions you can apply β€” season/episode offset mismatches are detected from real parsed episodes and applied with one call (POST /api/v1/bangumi/apply-offset/{id}, single or bulk).
  • SSE-driven WebUI β€” status, downloader, and log views subscribe to /api/v1/events/stream instead of three polling loops; a dead downloader can no longer freeze the stream (bounded fetch with explicit degraded payload).

Backend β€” Architecture

The backend went through a modernization refactor (REST API behavior unchanged):

  • Database layer fully asynchronous: repositories and Database on sqlite+aiosqlite (WAL + busy_timeout); no synchronous DB calls on the event loop
  • The Program god object replaced by a lifespan AppContext composition root with a generic PeriodicTask/Scheduler; startup is awaited and a failed migration aborts boot explicitly
  • Composition over inheritance throughout (RSSEngine/TorrentManager/Renamer/… take constructor-injected dependencies)
  • Table-driven migrations (database/migrations.py) with already_applied guards; old databases upgrade identically
  • Downloader Protocol with capability flags; qBittorrent login session reused across operations with automatic re-auth on 401/403 (#1039, #900)
  • Config changes uniformly through AppContext.reload_settings() β€” HTTP client, notifier, scheduler, and parser caches all reset consistently

Backend β€” Features

  • Security config model: login IP allowlist, MCP CIDR allowlist + Bearer Token dual authentication, Authorization: Bearer support on auth endpoints
  • Manual air-weekday API with calendar-refresh lock (PATCH /api/v1/bangumi/{id}/weekday, migration v9)
  • Configurable TMDB / bgm.tv API base URLs for users behind restrictive networks (#1040, #1042)
  • Per-provider parser choice for custom search providers; the OpenAI parser now rescues titles the regex parser fails on instead of replacing it entirely
  • Unauthenticated GET /health liveness endpoint ({status, version, db_ok}) and a Docker HEALTHCHECK
  • Auth stack migrated from unmaintained python-jose/passlib (CVE-2024-33663, CVE-2024-33664) to PyJWT + bcrypt β€” existing passwords, including >72-byte ones, keep working

Backend β€” Fixes

  • Failed torrent adds now actually retry on the next RSS tick; "already added" duplicates no longer emit failure notifications
  • Filter-rejected torrents no longer pollute offset detection
  • Season offset can no longer accidentally move regular episodes into Season 0 (Plex/Jellyfin Specials); only true specials land there
  • aria2: stale duplicate-tracking rows are reconciled when downloads are removed outside AutoBangumi; metadata-fetching magnets no longer crash the downloader list; renames refuse to overwrite existing files
  • qBittorrent SSL: self-signed certificates no longer break the connection (#923)
  • Destructive API endpoints converted from GET to POST (CSRF hardening)
  • OpenAI parsing no longer blocks the event loop (AsyncOpenAI)

Backend β€” Performance

  • Missing database indexes backfilled for upgrading installs (previously only fresh databases got them); offset-scanner and preference-dedup queries now index-backed (migrations v13/v14)
  • Title parser ~16% faster (all static regex precompiled)
  • Renamer fallback lookup batched: 201 β†’ 2 queries at 200 torrents (~11Γ—)
  • Notification dispatch parallelized across items (with the underlying HTTP-context race fixed first)

WebUI

  • Calendar drag-and-drop scheduling: drag an "Unknown" series onto a weekday to set and lock its air day
  • Component system unified on naive-ui (fixes a theme crash that could blank the Config page; naive-ui 2.44 for Vue 3.5 compatibility)
  • RSS page: per-feed and refresh-all buttons; decluttered table (source metadata beside the name, status column shows only state)
  • Calendar cards show the series title when no poster is available; bangumi titles wrap to two lines with full-title tooltips
  • Security settings UI (IP allowlists, tokens); mobile nav labels no longer truncate; WCAG AA contrast pass; log page copy fixes
  • Oversized editor components split into a shared useBangumiRuleForm composable

Tooling & CI

  • mypy type checking in CI at zero errors; ruff + frontend lint/vitest gates on dev-branch PRs
  • E2E suite (real qBittorrent + mock RSS via Docker) green: 67/67
  • scripts/dev.sh β€” one-command seeded development environment
  • Backend test suite: 990 tests (was 726 at 3.2)

Upgrade notes

  • Migrations v9–v14 run automatically on first start; a failed migration now aborts startup instead of continuing silently
  • group_tag keeps its historical meaning (qB rule naming only) β€” renamed filenames are unchanged, so existing seeding libraries are not touched
  • Beta feedback welcome, especially on aria2 setups, movie/special organization, and the new preference dedup