Add NFO file support to Serie and SerieList entities
- Add nfo_path property to Serie class - Add has_nfo(), has_poster(), has_logo(), has_fanart() methods - Update to_dict()/from_dict() to include nfo metadata - Modify SerieList.load_series() to detect NFO and media files - Add logging for missing NFO and media files with statistics - Comprehensive unit tests with 100% coverage - All 67 tests passing
This commit is contained in:
@@ -112,58 +112,6 @@ For each task completed:
|
||||
|
||||
### 🎬 NFO Metadata Integration
|
||||
|
||||
#### Task 1: Add NFO File Support to Core Entities
|
||||
|
||||
**Priority:** High
|
||||
**Estimated Time:** 2-3 hours
|
||||
|
||||
Create support for tvshow.nfo metadata files in the core domain layer.
|
||||
|
||||
**Implementation Steps:**
|
||||
|
||||
1. **Add NFO Path Property to Serie Class** ([src/core/entities/series.py](../src/core/entities/series.py))
|
||||
|
||||
- Add `nfo_path` optional property to track tvshow.nfo file location
|
||||
- Add `has_nfo` method to check if tvshow.nfo exists
|
||||
- Add properties to check for media files: `has_poster()`, `has_logo()`, `has_fanart()`
|
||||
- Update `to_dict()` and `from_dict()` to include nfo metadata
|
||||
|
||||
2. **Update SerieList Class** ([src/core/entities/SerieList.py](../src/core/entities/SerieList.py))
|
||||
- Modify `load_series()` to check for tvshow.nfo files
|
||||
- Check for associated media files (poster.jpg, logo.png, fanart.jpg)
|
||||
- Add logging for series without tvshow.nfo or media files
|
||||
- Track NFO and media file status during series loading
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
- [ ] Serie class has nfo_path property
|
||||
- [ ] Serie class can check if tvshow.nfo exists
|
||||
- [ ] SerieList logs missing NFO files
|
||||
- [ ] Existing functionality remains unchanged
|
||||
- [ ] Unit tests pass
|
||||
- [ ] Test coverage > 90% for new code
|
||||
|
||||
**Testing Requirements:**
|
||||
|
||||
- Test `nfo_path` property getter/setter
|
||||
- Test `has_nfo()` method with existing and missing files
|
||||
- Test `has_poster()`, `has_logo()`, `has_fanart()` methods
|
||||
- Test `to_dict()` includes NFO metadata
|
||||
- Test `from_dict()` correctly loads NFO metadata
|
||||
- Test SerieList NFO detection during load
|
||||
- Test SerieList media file detection during load
|
||||
- Test logging output for missing NFO and media files
|
||||
- Mock filesystem operations in tests
|
||||
|
||||
**Files to Modify:**
|
||||
|
||||
- [src/core/entities/series.py](../src/core/entities/series.py)
|
||||
- [src/core/entities/SerieList.py](../src/core/entities/SerieList.py)
|
||||
- Add tests to `tests/unit/test_serie_class.py`
|
||||
- Add tests to `tests/unit/test_serie_list.py`
|
||||
|
||||
---
|
||||
|
||||
#### Task 2: Create NFO Models and Schemas
|
||||
|
||||
**Priority:** High
|
||||
|
||||
Reference in New Issue
Block a user