From 67eddde74147e9e860a281f3b1c4e7e11ec9b70e Mon Sep 17 00:00:00 2001 From: OctoBored <212877535+OctoBored@users.noreply.github.com> Date: Thu, 13 Aug 2026 11:46:37 +0000 Subject: [PATCH 1/3] docs: point star history chart to a working data source The star history chart in the README has been broken for a while due to GitHub's stargazer API restrictions, so visitors no longer see an up-to-date chart. Update the chart image and link to a working mirror at star-history.dera.page so the graph renders correctly again. The chart was originally added in e9367e3. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32179353..79e1b23f 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ ## Star History -[![Star History Chart](https://api.star-history.com/svg?repos=EstrellaXD/Auto_Bangumi&type=Date)](https://star-history.com/#EstrellaXD/Auto_Bangumi) +[![Star History Chart](https://star-history.dera.page/svg?repos=EstrellaXD/Auto_Bangumi&type=Date)](https://star-history.dera.page/#EstrellaXD/Auto_Bangumi) ## 贡献 From 29dc558789da1c0f79884efcc0e3d55db15f2afc Mon Sep 17 00:00:00 2001 From: Estrella Pan Date: Sat, 24 Oct 2026 11:03:45 +0200 Subject: [PATCH 2/3] =?UTF-8?q?fix(update):=20=E5=BA=94=E7=94=A8=E5=86=85?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=AA=E6=8F=90=E4=BE=9B=E5=90=8C=E4=B8=80?= =?UTF-8?q?=E4=B8=BB=E7=89=88=E6=9C=AC=E7=9A=84=E5=8F=91=E5=B8=83=EF=BC=8C?= =?UTF-8?q?=E5=87=86=E5=A4=87=203.3.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 4.0 的更新包要求 4.0 镜像,3.3 镜像上无法应用;稳定版与测试版渠道都不再提供 4.x。 发布列表每页取 100 条,4.x 发布增多后仍能找到 3.x 发布。 --- CHANGELOG.md | 6 ++++++ backend/pyproject.toml | 2 +- backend/src/module/update/updater.py | 7 ++++++- backend/src/test/test_update.py | 16 ++++++++++++++++ backend/uv.lock | 4 ++-- docs/changelog/3.3.md | 6 ++++++ 6 files changed, 37 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b63a33dc..6195f18c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [3.3.7] - 2026-10-24 + +3.3.7 只改应用内更新,为 4.0 正式版做准备。 + +- **变更(应用内更新)**:「软件更新」只提供与当前镜像主版本相同的版本(3.x),稳定版与测试版渠道都是如此。4.0 的更新包要求 4.0 镜像,在 3.3 镜像上无法应用;升级到 4.0 请更换镜像标签,步骤见 [从 3.3 升级到 4.0](https://www.autobangumi.org/deploy/upgrade-4.0) + # [3.3.6] - 2026-09-19 3.3.6 是问题修复版本,修复 3.3.5 发布后报告的 RSS 匹配、网络、解析与部署问题。 diff --git a/backend/pyproject.toml b/backend/pyproject.toml index de300f94..52973ac6 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "auto-bangumi" -version = "3.3.6" +version = "3.3.7" description = "AutoBangumi - Automated anime download manager" requires-python = ">=3.13" dependencies = [ diff --git a/backend/src/module/update/updater.py b/backend/src/module/update/updater.py index 489abb54..196429a1 100644 --- a/backend/src/module/update/updater.py +++ b/backend/src/module/update/updater.py @@ -217,7 +217,7 @@ class Updater: async def _fetch_releases(self) -> list[dict]: client = await self._get_client() - url = f"{_API_BASE}/repos/{self.owner}/{self.repo}/releases?per_page=20" + url = f"{_API_BASE}/repos/{self.owner}/{self.repo}/releases?per_page=100" resp = await client.get(url, headers=_API_HEADERS) resp.raise_for_status() data = resp.json() @@ -269,6 +269,9 @@ class Updater: return bundle_url, sha_url, sig_url def _pick_release(self, releases: list[dict], channel: str) -> Optional[dict]: + # 只提供与镜像同一主版本的更新:下一个主版本的更新包要求新镜像 + # (min_image_version),只能更换镜像标签升级 + image = _parse_semver(self.image_version) candidates: list[tuple[semver.VersionInfo, dict]] = [] for rel in releases: if rel.get("draft"): @@ -278,6 +281,8 @@ class Updater: ver = _parse_semver(rel.get("tag_name") or "") if ver is None: continue + if image is not None and ver.major != image.major: + continue candidates.append((ver, rel)) if not candidates: return None diff --git a/backend/src/test/test_update.py b/backend/src/test/test_update.py index f6fadf5b..77732462 100644 --- a/backend/src/test/test_update.py +++ b/backend/src/test/test_update.py @@ -233,6 +233,22 @@ class TestCheckUpdate: assert res.is_prerelease is True assert res.has_update is True + @pytest.mark.parametrize( + "channel, expected", [("stable", "3.3.7"), ("beta", "3.3.8-beta.1")] + ) + def test_next_major_release_is_not_offered(self, tmp_path, channel, expected): + """4.x 的更新包要求 4.x 镜像,3.x 镜像只能更换镜像标签升级。""" + releases = [ + {"tag_name": tag, "prerelease": "beta" in tag} + for tag in ("4.0.0", "4.0.0-beta.9", "3.3.8-beta.1", "3.3.7") + ] + up = Updater( + root=tmp_path / "u", current_version="3.3.6", image_version="3.3.6" + ) + picked = up._pick_release(releases, channel) + assert picked is not None + assert picked["tag_name"] == expected + @pytest.mark.asyncio async def test_no_update_when_current_is_latest(self, tmp_path, bundle): data, sha = bundle diff --git a/backend/uv.lock b/backend/uv.lock index 8a32c736..f6fe9952 100644 --- a/backend/uv.lock +++ b/backend/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 5 requires-python = ">=3.13" resolution-markers = [ "python_full_version >= '3.15'", @@ -125,7 +125,7 @@ wheels = [ [[package]] name = "auto-bangumi" -version = "3.3.6" +version = "3.3.7" source = { virtual = "." } dependencies = [ { name = "aiosqlite" }, diff --git a/docs/changelog/3.3.md b/docs/changelog/3.3.md index 1ef2686a..f866fb03 100644 --- a/docs/changelog/3.3.md +++ b/docs/changelog/3.3.md @@ -2,6 +2,12 @@ 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 through schema v24. +## 3.3.7 — In-app update stays on 3.x + +3.3.7 changes only the in-app update, to prepare for the 4.0 stable release. + +- **In-app update:** Software Update now offers only versions with the same major version as the image (3.x), on the stable and the beta channel. A 4.0 update bundle needs a 4.0 image and cannot be applied on a 3.3 image. To upgrade to 4.0, change the image tag. See [Upgrade from 3.3 to 4.0](https://www.autobangumi.org/en/deploy/upgrade-4.0). + ## 3.3.6 — RSS matching, proxy, parser, and deployment fixes 3.3.6 is a bugfix release for issues reported after 3.3.5. From f84e31d8e0544aab2b45ceec3e5f7a86f48c00aa Mon Sep 17 00:00:00 2001 From: Estrella Pan Date: Sat, 24 Oct 2026 11:09:21 +0200 Subject: [PATCH 3/3] =?UTF-8?q?fix(update):=20=E9=95=9C=E5=83=8F=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=97=A0=E6=B3=95=E8=A7=A3=E6=9E=90=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E4=BB=BB=E4=BD=95=E6=9B=B4=E6=96=B0=EF=BC=88?= =?UTF-8?q?Codex=20=E5=AE=A1=E6=9F=A5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/module/update/updater.py | 4 +++- backend/src/test/test_update.py | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/src/module/update/updater.py b/backend/src/module/update/updater.py index 196429a1..bafda206 100644 --- a/backend/src/module/update/updater.py +++ b/backend/src/module/update/updater.py @@ -217,6 +217,7 @@ class Updater: async def _fetch_releases(self) -> list[dict]: client = await self._get_client() + # ponytail: 只取第一页;之后的 4.x 发布超过 100 个时,再按页往后找 3.x url = f"{_API_BASE}/repos/{self.owner}/{self.repo}/releases?per_page=100" resp = await client.get(url, headers=_API_HEADERS) resp.raise_for_status() @@ -281,7 +282,8 @@ class Updater: ver = _parse_semver(rel.get("tag_name") or "") if ver is None: continue - if image is not None and ver.major != image.major: + # 镜像版本无法解析(开发/本地构建)时 _image_supports 拒绝任何更新包 + if image is None or ver.major != image.major: continue candidates.append((ver, rel)) if not candidates: diff --git a/backend/src/test/test_update.py b/backend/src/test/test_update.py index 77732462..a96b4ca6 100644 --- a/backend/src/test/test_update.py +++ b/backend/src/test/test_update.py @@ -249,6 +249,14 @@ class TestCheckUpdate: assert picked is not None assert picked["tag_name"] == expected + def test_unparseable_image_version_is_offered_nothing(self, tmp_path): + """开发/本地构建不能应用更新包,也不应提示有更新。""" + releases = [{"tag_name": "3.3.7", "prerelease": False}] + up = Updater( + root=tmp_path / "u", current_version="3.3.6", image_version="DEV_VERSION" + ) + assert up._pick_release(releases, "stable") is None + @pytest.mark.asyncio async def test_no_update_when_current_is_latest(self, tmp_path, bundle): data, sha = bundle