Commit Graph

18 Commits

Author SHA1 Message Date
Estrella Pan
fa24ec4e2a fix(core): stop blocking the event loop in OpenAI parsing and static routing
OpenAIParser now uses AsyncOpenAI — the previous sync SDK call ran directly
on the event loop (submitting to a ThreadPoolExecutor and immediately
blocking on .result() serialized it anyway). TitleParser.raw_parser and its
callers become async accordingly.

The SPA catch-all route listed dist/ on every request; snapshot it once at
startup. The module-level bangumi TTL cache is now lock-guarded — it is
written from asyncio.to_thread workers in notification paths while the event
loop reads it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014w1Z6Nxy6XTRgkFXqPr9Zh
2026-07-02 11:39:10 +02:00
Estrella Pan
d980c3c714 fix(parser): handle None return from raw_parser to avoid AttributeError (#992)
When raw_parser fails to parse non-episodic resources (movies, collections),
it returns None. Add guard clause in title_parser to skip these gracefully
instead of crashing on attribute access. Downgrade log level from error to
info since this is expected behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 08:12:18 +01:00
Estrella Pan
c7206a351f fix(parser): prevent crash on titles starting with numbers (#990)
Titles like "29 岁单身冒险家的日常" cause the regex to match the leading
number as episode, leaving title_raw as None. This cascades into storing
null aliases and crashing match_torrent with TypeError.

- Fall back to title_jp when title_en and title_zh are both None
- Return None from raw_parser when no title can be extracted
- Reject None/empty aliases in add_title_alias
- Filter null values from parsed title_aliases JSON
- Skip None title_raw in get_all_title_patterns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:36:25 +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
EstrellaXD
0c8ebb70a3 fix(error-handling): replace bare except clauses with specific exceptions
- qb_downloader.py: catch httpx network errors in logout() and rename_file()
- user.py: log exception details when querying users table fails
- download_client.py: log exception when category creation fails
- title_parser.py: catch specific exceptions (ValueError, AttributeError, TypeError)
  instead of broad Exception in raw_parser()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:51:44 +01:00
Estrella Pan
a98a162500 feat: fix search, poster serving, and add hover overlay UI for cards
- 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>
2026-01-23 21:20:12 +01:00
100gle
f2db6542ad chore: move openai module to analyser module 2023-10-01 20:59:09 +08:00
100gle
2751bcabb2 refactor: flatten openai configuration options 2023-10-01 13:00:05 +08:00
100gle
74bdcb915f chore: remove unused print 2023-10-01 09:39:01 +08:00
100gle
3f517c4d2d feat: integrate OpenAIParserto TitleParser 2023-09-30 19:42:31 +08:00
EstrellaXD
a5f9f858bc fix: collector season limit 2023-09-25 19:14:07 +08:00
EstrellaXD
2e4cf0d621 feat: add tmdb poster. 2023-09-06 23:48:39 +08:00
EstrellaXD
ce8baff938 fix: rss api bug. fix ui. 2023-08-29 21:27:18 +08:00
EstrellaXD
dd5c918703 change: change rss item database, add more option for split rss link. 2023-08-12 15:40:43 +08:00
EstrellaXD
d768299c7f fix: fix bugs. 2023-08-06 16:04:38 +08:00
estrella
9b99e6c591 test: add mock test to database. 2023-07-31 16:00:54 +08:00
EstrellaXD
de832888ac Merge branch '3.0-dev' into 3.1-dev
# Conflicts:
#	backend/src/module/checker/checker.py
#	backend/src/module/database/bangumi.py
#	backend/src/module/notification/notification.py
#	backend/src/module/notification/plugin/bark.py
#	backend/src/module/parser/analyser/tmdb_parser.py
2023-06-13 22:02:48 +08:00
zthxxx
069a86faa0 chore: move Auto_Bangumi/src -> Auto_Bangumi/backend/src, prepare for merge WebUI repo 2023-06-06 22:33:00 +08:00