- 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
- Add comprehensive download queue models in src/server/models/download.py
- DownloadStatus and DownloadPriority enums for type safety
- EpisodeIdentifier for episode references
- DownloadProgress for real-time progress tracking
- DownloadItem for queue item representation with timestamps and error handling
- QueueStatus for overall queue state management
- QueueStats for aggregated queue statistics
- DownloadRequest/DownloadResponse for API contracts
- QueueOperationRequest and QueueReorderRequest for queue management
- QueueStatusResponse for complete status endpoint responses
- Add comprehensive unit tests (47 tests, all passing)
- Test validation constraints (positive numbers, ranges, etc.)
- Test default values and optional fields
- Test serialization/deserialization
- Test model relationships and nested structures
- Update documentation
- Add download models section to infrastructure.md
- Remove completed task from instructions.md
- Update models package __init__.py
All models follow PEP 8 style guide with proper type hints and validation.