Task 3.1: Standardize series identifiers in DownloadService
- Updated DownloadService to use 'serie_id' (provider key) for identification - Changed 'serie_folder' from Optional to required in models (DownloadItem, DownloadRequest) - Removed incorrect fallback logic that used serie_id as folder name - Enhanced docstrings to clarify purpose of each identifier field: * serie_id: Provider key (e.g., 'attack-on-titan') for lookups * serie_folder: Filesystem folder name (e.g., 'Attack on Titan (2013)') for file operations - Updated logging to reference 'serie_key' for clarity - Fixed all unit tests to include required serie_folder field - All 25 download service tests passing - All 47 download model tests passing - Updated infrastructure.md with detailed documentation - Marked Task 3.1 as completed in instructions.md Benefits: - Clear separation between provider identifier and filesystem path - Prevents confusion from mixing different identifier types - Consistent with broader series identifier standardization effort - Better error messages when required fields are missing
This commit is contained in:
@@ -346,6 +346,7 @@ class TestQueueControl:
|
||||
completed_item = DownloadItem(
|
||||
id="completed-1",
|
||||
serie_id="series-1",
|
||||
serie_folder="Test Series (2023)",
|
||||
serie_name="Test Series",
|
||||
episode=EpisodeIdentifier(season=1, episode=1),
|
||||
status=DownloadStatus.COMPLETED,
|
||||
@@ -454,6 +455,7 @@ class TestRetryLogic:
|
||||
failed_item = DownloadItem(
|
||||
id="failed-1",
|
||||
serie_id="series-1",
|
||||
serie_folder="Test Series (2023)",
|
||||
serie_name="Test Series",
|
||||
episode=EpisodeIdentifier(season=1, episode=1),
|
||||
status=DownloadStatus.FAILED,
|
||||
@@ -476,6 +478,7 @@ class TestRetryLogic:
|
||||
failed_item = DownloadItem(
|
||||
id="failed-1",
|
||||
serie_id="series-1",
|
||||
serie_folder="Test Series (2023)",
|
||||
serie_name="Test Series",
|
||||
episode=EpisodeIdentifier(season=1, episode=1),
|
||||
status=DownloadStatus.FAILED,
|
||||
|
||||
Reference in New Issue
Block a user