Fix NFO service 503 error

- Load TMDB API key and NFO settings from config.json
- Sync NFO config to settings during app startup
- NFO endpoints now work correctly (no more 503)
This commit is contained in:
2026-01-18 11:59:57 +01:00
parent db1e7fa54b
commit 9877f9400c
2 changed files with 39 additions and 1 deletions

View File

@@ -39,7 +39,16 @@ If you encounter:
---
## 📚 Helpful Commands
## <EFBFBD> Credentials
**Admin Login:**
- Username: `admin`
- Password: `Hallo123!`
---
## <20>📚 Helpful Commands
```bash
# Run all tests
@@ -114,6 +123,21 @@ All tasks completed! The NFO database query issue has been resolved.
## Recently Fixed Issues:
### ✅ Fixed: NFO Service 503 Error (2026-01-18)
**Issue:** Failed to load resource: the server responded with a status of 503 (Service Unavailable) when creating NFO files.
**Root Cause:** The TMDB API key configured in `data/config.json` was not being loaded into the application settings during startup. The NFO service dependency check was failing because `settings.tmdb_api_key` was None.
**Solution:** Updated `fastapi_app.py` startup code to sync NFO configuration (including TMDB API key) from `data/config.json` to `settings` object, similar to how `anime_directory` was already being synced.
**Files Modified:**
- [src/server/fastapi_app.py](../src/server/fastapi_app.py)
**Verification:** NFO endpoints now return 200 OK instead of 503, and NFO creation is functional.
---
### ✅ Fixed: NFO Database Query Error (2026-01-18)
**Issue:** WARNING: Could not fetch NFO data from database: '\_AsyncGeneratorContextManager' object has no attribute 'query'