Implement initial NFO scan tracking for one-time setup

- Add NFO scanning to startup process (fastapi_app.py)
- Check initial_nfo_scan_completed flag before running NFO scan
- Run NFO scan only on first startup if TMDB API key is configured
- Mark NFO scan as completed after first successful run
- Skip NFO scan on subsequent startups

This ensures NFO metadata processing only occurs during initial setup,
not on every application restart, improving startup performance.
This commit is contained in:
2026-01-21 19:25:30 +01:00
parent db7e21a14c
commit 9f1158b9af
2 changed files with 68 additions and 4 deletions

View File

@@ -124,10 +124,10 @@ make sure you maintain the function on one location
1. ✅ scanning anime from folder - COMPLETED
Implemented initial scan tracking using SystemSettings table. Anime folder scanning now only runs during initial setup, not on each application start.
- Added SystemSettings model with initial_scan_completed flag
- Created SystemSettingsService for managing setup state
- Modified fastapi_app.py to check scan completion status on startup
- Added unit test for SystemSettingsService
- Added SystemSettings model with initial_scan_completed flag
- Created SystemSettingsService for managing setup state
- Modified fastapi_app.py to check scan completion status on startup
- Added unit test for SystemSettingsService
2. Nfo scan
make sure nfo scan runs only on setup and not on each start