diff --git a/core/amazon_download_client.py b/core/amazon_download_client.py index fb5dcdb6..44c92474 100644 --- a/core/amazon_download_client.py +++ b/core/amazon_download_client.py @@ -431,7 +431,7 @@ class AmazonDownloadClient(DownloadSourcePlugin): def _record_to_status(download_id: str, rec: Dict[str, Any]) -> DownloadStatus: return DownloadStatus( id=download_id, - filename=str(rec.get("original_filename", "")), + filename=str(rec.get("filename", "")), username="amazon", state=str(rec.get("state", "queued")), progress=float(rec.get("progress", 0.0)), diff --git a/tests/tools/test_amazon_download_client.py b/tests/tools/test_amazon_download_client.py index 0ab0f85b..47ea0715 100644 --- a/tests/tools/test_amazon_download_client.py +++ b/tests/tools/test_amazon_download_client.py @@ -325,7 +325,7 @@ class TestUniquePath: class TestRecordToStatus: def test_fields_mapped(self): rec = { - "original_filename": "B1||Artist - Title", + "filename": "B1||Artist - Title", "state": "downloading", "progress": 0.5, "size": 10_000_000, @@ -718,7 +718,7 @@ class TestStatusInterface: engine = MagicMock() engine.get_all_records.return_value = { "dl-001": { - "original_filename": "B1||A - T", + "filename": "B1||A - T", "state": "complete", "progress": 1.0, "size": 5_000_000,