Archived
Fix ani-cli version probe player mode
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# 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
|
## 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.
|
- 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.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Local web UI for a system-wide `ani-cli` install.
|
Local web UI for a system-wide `ani-cli` install.
|
||||||
|
|
||||||
Current version: `0.49.8`
|
Current version: `0.49.9`
|
||||||
|
|
||||||
## What it does
|
## 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:
|
The Config page runtime panel shows:
|
||||||
|
|
||||||
- `ani-cli-web` version loaded from `VERSION`
|
- `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
|
- Installed `anipy-cli` and `animdl` versions and dependency status
|
||||||
- A `Changelog` button that opens a scrollable viewer backed by `CHANGELOG.md`
|
- A `Changelog` button that opens a scrollable viewer backed by `CHANGELOG.md`
|
||||||
|
|
||||||
|
|||||||
@@ -239,6 +239,11 @@ def installed_ani_cli_version():
|
|||||||
[ANI_CLI, "--version"],
|
[ANI_CLI, "--version"],
|
||||||
check=True,
|
check=True,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
|
env={
|
||||||
|
**os.environ.copy(),
|
||||||
|
"ANI_CLI_PLAYER": "download",
|
||||||
|
"TERM": os.environ.get("TERM", "xterm-256color"),
|
||||||
|
},
|
||||||
text=True,
|
text=True,
|
||||||
timeout=6,
|
timeout=6,
|
||||||
)
|
)
|
||||||
|
|||||||
+17
@@ -3319,6 +3319,23 @@ class HandlerRouteTests(unittest.TestCase):
|
|||||||
self.assertIn("anipy_cli_version", handler.json_payload)
|
self.assertIn("anipy_cli_version", handler.json_payload)
|
||||||
self.assertIn("animdl_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):
|
def test_dependencies_route_reports_fallback_tool_status(self):
|
||||||
handler = DummyHandler("/api/dependencies")
|
handler = DummyHandler("/api/dependencies")
|
||||||
APP.Handler.do_GET(handler)
|
APP.Handler.do_GET(handler)
|
||||||
|
|||||||
Reference in New Issue
Block a user