diff --git a/backend/app/services/snapshot.py b/backend/app/services/snapshot.py index 971163e..6ca02de 100644 --- a/backend/app/services/snapshot.py +++ b/backend/app/services/snapshot.py @@ -558,6 +558,7 @@ def _build_repair_activity( ) state = "complete" if jellyfin_found else "indexing" download_step_state = "complete" + download_step_detail = f"{collector} reports the replacement file as collected and imported." available_step_state = "complete" if jellyfin_found else "active" elif download_visible and download_state in {"downloading", "paused", "completed", "error", "missing"}: state = { @@ -584,6 +585,9 @@ def _build_repair_activity( download_step_state = "active" if download_state == "downloading" else ( "complete" if download_state == "completed" else "attention" ) + download_step_detail = str( + download.get("summary") or "Magent found the replacement download in qBittorrent." + ) available_step_state = "waiting" else: state = "searching" @@ -593,6 +597,7 @@ def _build_repair_activity( "has been selected yet. Magent will keep checking." ) download_step_state = "waiting" + download_step_detail = "Waiting for a suitable release to be selected." available_step_state = "waiting" return { @@ -615,11 +620,7 @@ def _build_repair_activity( "id": "download", "label": "Replacement download", "state": download_step_state, - "detail": ( - str(download.get("summary") or "Waiting for a suitable replacement release.") - if download_step_state != "waiting" - else "Waiting for a suitable release to be selected." - ), + "detail": download_step_detail, }, { "id": "available", diff --git a/backend/tests/test_backend_quality.py b/backend/tests/test_backend_quality.py index 52ecf03..372ece0 100644 --- a/backend/tests/test_backend_quality.py +++ b/backend/tests/test_backend_quality.py @@ -482,6 +482,10 @@ class RequestPresentationTests(unittest.TestCase): self.assertIsNotNone(activity) self.assertEqual(activity["state"], "indexing") self.assertEqual(activity["steps"][2]["state"], "complete") + self.assertEqual( + activity["steps"][2]["detail"], + "Radarr reports the replacement file as collected and imported.", + ) self.assertEqual(activity["steps"][3]["state"], "active") def test_torrent_progress_keeps_tenths_for_live_updates(self) -> None: