Force ani-cli headless download mode

This commit is contained in:
Codex
2026-07-21 12:00:33 +02:00
parent ce8ca1d4fb
commit 629cf8dcb6
5 changed files with 12 additions and 2 deletions
+3
View File
@@ -1094,6 +1094,7 @@ class DownloadQueueWorkerFailureTests(unittest.TestCase):
)
job = queue.add({"query": "Queue Show", "title": "Queue Show", "season": "1", "episodes": "1"})
commands = []
envs = []
class FakeProc:
def __init__(self, pid, stdout, exit_code):
@@ -1112,6 +1113,7 @@ class DownloadQueueWorkerFailureTests(unittest.TestCase):
def fake_popen(command, **kwargs):
commands.append(command)
envs.append(kwargs.get("env", {}))
return processes.pop(0)
with mock.patch.object(queue_jobs, "cli_executable_exists", return_value=True), mock.patch.object(
@@ -1125,6 +1127,7 @@ class DownloadQueueWorkerFailureTests(unittest.TestCase):
self.assertEqual(stored["status"], "done")
self.assertTrue(stored["fallback_used"])
self.assertEqual([command[0] for command in commands], [APP.app_support.ANI_CLI, APP.app_support.ANIPY_CLI, APP.app_support.ANIMDL])
self.assertEqual(envs[0]["ANI_CLI_PLAYER"], "download")
self.assertIn("Fallback download completed with animdl.", stored["log"])