Fix NFO creation 500 error for missing folders

- Auto-create series folder if it doesn't exist
- Add unit and integration tests for folder creation
- NFO creation now works for newly added series
This commit is contained in:
2026-01-18 12:07:37 +01:00
parent 9877f9400c
commit 4e56093ff9
4 changed files with 261 additions and 2 deletions

View File

@@ -100,7 +100,8 @@ class NFOService:
folder_path = self.anime_directory / serie_folder
if not folder_path.exists():
raise FileNotFoundError(f"Series folder not found: {folder_path}")
logger.info(f"Creating series folder: {folder_path}")
folder_path.mkdir(parents=True, exist_ok=True)
async with self.tmdb_client:
# Search for TV show