feat: Add NFO metadata infrastructure (Task 3 - partial)

- Created TMDB API client with async requests, caching, and retry logic
- Implemented NFO XML generator for Kodi/XBMC format
- Created image downloader for poster/logo/fanart with validation
- Added NFO service to orchestrate metadata creation
- Added NFO-related configuration settings
- Updated requirements.txt with aiohttp, lxml, pillow
- Created unit tests (need refinement due to implementation mismatch)

Components created:
- src/core/services/tmdb_client.py (270 lines)
- src/core/services/nfo_service.py (390 lines)
- src/core/utils/nfo_generator.py (180 lines)
- src/core/utils/image_downloader.py (296 lines)
- tests/unit/test_tmdb_client.py
- tests/unit/test_nfo_generator.py
- tests/unit/test_image_downloader.py

Note: Tests need to be updated to match actual implementation APIs.
Dependencies installed: aiohttp, lxml, pillow
This commit is contained in:
2026-01-11 20:33:33 +01:00
parent 5e8815d143
commit 4895e487c0
10 changed files with 2270 additions and 1 deletions

View File

@@ -14,4 +14,7 @@ pytest==7.4.3
pytest-asyncio==0.21.1
httpx==0.25.2
sqlalchemy>=2.0.35
aiosqlite>=0.19.0
aiosqlite>=0.19.0
aiohttp>=3.9.0
lxml>=5.0.0
pillow>=10.0.0