Compact request activity into a live summary and modal history

This commit is contained in:
2026-09-06 22:20:33 +12:00
parent 009bb35032
commit 74c49fad5b
10 changed files with 223 additions and 71 deletions
+13 -3
View File
@@ -240,7 +240,7 @@ class OperationMessageTests(unittest.TestCase):
)
self.assertEqual(queue_message, "Sonarr has no matching downloads in its queue.")
self.assertEqual(health_message, "Prowlarr reports that all configured indexers are healthy.")
self.assertEqual(health_message, "The download search sources are working normally.")
def test_download_and_jellyfin_results_include_actual_state(self) -> None:
torrent_message = _torrent_result_message(
@@ -249,11 +249,11 @@ class OperationMessageTests(unittest.TestCase):
self.assertEqual(
torrent_message,
'qBittorrent found "Arrival.2016"; it is downloading and 42% complete.',
'Downloading 42% complete.',
)
self.assertEqual(
_availability_message({"TotalRecordCount": 0, "Items": []}),
"The title is not currently available in Jellyfin.",
"Grizzlyflix did not find this title in its library search.",
)
def test_bazarr_subtitle_search_is_explained_in_plain_english(self) -> None:
@@ -270,6 +270,16 @@ class OperationMessageTests(unittest.TestCase):
"Bazarr accepted a fresh EN subtitle search for the selected episode.",
)
def test_library_search_does_not_claim_playable_media(self) -> None:
message = _availability_message({"TotalRecordCount": 1, "Items": [{"Name": "Example"}]})
self.assertIn("still needs to check the exact title and file", message)
self.assertNotIn("available to watch", message)
def test_finished_or_paused_download_is_not_described_as_stuck(self) -> None:
for state in ["stalledUP", "stoppedUP", "pausedUP"]:
self.assertIn("finished", _torrent_result_message([{"state": state, "progress": 1}]))
self.assertIn("paused", _torrent_result_message([{"state": "stoppedDL", "progress": .3}]))
def test_http_failures_are_translated_without_exposing_stack_traces(self) -> None:
self.assertEqual(
_operation_error_message("Radarr", 500),