diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e2b837..e79715f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.49.9 - 2026-07-26 + +- Changed the Config page `ani-cli` version probe to run with `ANI_CLI_PLAYER=download`, avoiding false missing-player failures on headless installs without `mpv` or `vlc`. +- Added regression coverage for the player-safe `ani-cli --version` environment. + ## 0.49.8 - 2026-07-21 - Forced queued `ani-cli` attempts into explicit download-player mode with `ANI_CLI_PLAYER=download`, preventing headless Docker jobs from failing the upstream player check when `mpv` or `vlc` are not installed. diff --git a/README.md b/README.md index f190330..cd34936 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Local web UI for a system-wide `ani-cli` install. -Current version: `0.49.8` +Current version: `0.49.9` ## What it does @@ -162,7 +162,7 @@ This endpoint is intentionally small so Homepage can map the returned values dir The Config page runtime panel shows: - `ani-cli-web` version loaded from `VERSION` -- Installed `ani-cli` version +- Installed `ani-cli` version, checked with download-player mode so headless installs do not need `mpv` or `vlc` for runtime info - Installed `anipy-cli` and `animdl` versions and dependency status - A `Changelog` button that opens a scrollable viewer backed by `CHANGELOG.md` diff --git a/VERSION b/VERSION index 3174c45..f9ebf27 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.49.8 +0.49.9 diff --git a/http_handler.py b/http_handler.py index 5371677..0214a66 100644 --- a/http_handler.py +++ b/http_handler.py @@ -239,6 +239,11 @@ def installed_ani_cli_version(): [ANI_CLI, "--version"], check=True, capture_output=True, + env={ + **os.environ.copy(), + "ANI_CLI_PLAYER": "download", + "TERM": os.environ.get("TERM", "xterm-256color"), + }, text=True, timeout=6, ) diff --git a/test_app.py b/test_app.py index d70343d..87b6d91 100644 --- a/test_app.py +++ b/test_app.py @@ -3319,6 +3319,23 @@ class HandlerRouteTests(unittest.TestCase): self.assertIn("anipy_cli_version", handler.json_payload) self.assertIn("animdl_version", handler.json_payload) + def test_ani_cli_version_probe_uses_download_player(self): + http_handler.installed_ani_cli_version.cache_clear() + calls = [] + + def fake_run(command, **kwargs): + calls.append((command, kwargs)) + return mock.Mock(stdout="ani-cli 4.9.0\n", stderr="") + + try: + with mock.patch.object(http_handler.subprocess, "run", side_effect=fake_run): + self.assertEqual(http_handler.installed_ani_cli_version(), "ani-cli 4.9.0") + finally: + http_handler.installed_ani_cli_version.cache_clear() + + self.assertEqual(calls[0][0], [http_handler.ANI_CLI, "--version"]) + self.assertEqual(calls[0][1]["env"]["ANI_CLI_PLAYER"], "download") + def test_dependencies_route_reports_fallback_tool_status(self): handler = DummyHandler("/api/dependencies") APP.Handler.do_GET(handler)