fix: batch bug fixes for 3.2.7 (#1016, #983, #1025, #994, #1015)#1027
Merged
Conversation
When AB runs in a Linux container and qBittorrent runs on a Windows host, qB returns save_path strings with backslash separators. PurePosixPath treats those as a single unsplittable segment, so _path_to_bangumi never matched "Season N" and every non-S1 bangumi collapsed to Season 1. PureWindowsPath accepts both "\\" and "/" as separators, so using it for the parsing side handles both layouts. Path generation (_gen_save_path / _join_path) still uses the platform-conditional Path alias, so AB keeps emitting native paths for the host it runs on. Diagnosis and fix credited to the reporter in #1016. Closes #1016
Mikanime's mirror (and some CDN-fronted sources) respond with 302 to the canonical host. httpx AsyncClient defaults to follow_redirects=False, so raise_for_status surfaced the 302 as an HTTPStatusError and the RSS pull failed in a retry loop. Enable follow_redirects=True for every construction of the shared client (proxy, socks5, and direct branches) via a shared kwargs dict. Closes #983
prefix_process called re.sub(f".{group}.", "", raw) unconditionally. When
group was empty (torrents that don't start with [group]), the pattern
degenerated to ".." and every pair of characters in the title was deleted,
leaving a stub the downstream splitter couldn't turn into title_en/zh/jp.
Guarded the substitution with `if group:`. Titles like
"冰之城墙「氷の城壁」The Ramparts of Ice S01E02 1080p 日英双语-多国字幕"
and "Girls Band Cry S01E05 ..." now parse correctly. Updated #764's test
which had been pinned to the broken behavior.
Closes #1025
#1015) The release artifact only zipped backend/src, omitting pyproject.toml and uv.lock, so local deployments couldn't install dependencies. #994 also reported the missing requirements.txt after the uv migration in 3.2.0. Install uv in the release job and generate a production-only requirements.txt via `uv export --no-dev`, then bundle all three alongside src in the app zip. Closes #994 Closes #1015
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four independent bug fixes on one branch. Each is a separate commit so they can be cherry-picked or reverted individually if needed.
Fixes
3d0307f— fix(downloader): parse Windows qB save_path on Linux hosts (#1016)AB-on-Linux parsing qB-on-Windows save_path failed because
PurePosixPathtreatsD:\\video\\foo\\Season 4as a single segment, collapsing every non-S1 bangumi to S01. Switched_path_to_bangumitoPureWindowsPath, which accepts both/and\\separators. Path generation (_gen_save_path,_join_path) still uses the platform-conditionalPathalias, so AB keeps emitting native paths for its own host.Closes #1016
8130789— fix(network): follow 302 redirects in shared httpx client (#983)Mikanime's mirror and some CDNs respond with 302.
httpx.AsyncClientdefaults tofollow_redirects=False, soraise_for_status()surfaced the 302 as an error and the RSS pull failed in a retry loop. Addedfollow_redirects=Trueto every shared-client construction (proxy, socks5, direct).Closes #983
90239b0— fix(parser): stop destroying titles without a [group] prefix (#1025)prefix_processcalledre.sub(f\".{group}.\", \"\", raw)unconditionally. Whengroupwas empty (torrents without a[group]prefix), the pattern degenerated to\"..\"and deleted every pair of characters. Guarded withif group:. Titles like冰之城墙「氷の城壁」The Ramparts of Ice S01E02 ...andGirls Band Cry S01E05 ...now parse correctly. Updated #764's test which was pinned to the broken behavior.Closes #1025
07522ae— ci(release): include pyproject.toml / uv.lock / requirements.txt (#994, #1015)Release artifact only zipped
backend/src, omittingpyproject.tomlanduv.lock— users couldn't install deps locally. #994 separately asked forrequirements.txtafter the uv migration. Install uv in the release job, generate a production-onlyrequirements.txtviauv export --no-dev, and bundle all three alongsidesrc.Closes #994
Closes #1015
Test plan
test_path_to_bangumi_windows_style_save_path([重命名错误]季度总是被置为01 #1016)test_path_to_bangumi_posix_path_on_linux_ab([重命名错误]季度总是被置为01 #1016 guard)test_client_follows_redirects([错误报告]部分情况下会出现访问mikanime.tv,返回302 并失败 #983)TestIssue1025NoGroupPrefix::test_mixed_cjk_and_en_without_group([解析器错误] Cannot extract title_raw #1025)TestIssue764WesternFormatassertion updated — it was pinned to the destructive prefix_process behavior; now asserts correct title extractionuv export --format requirements-txt --no-hashes --no-devverified locallyRisk
[group]prefix and follow the identical code path.