fix: handle missing anime directory gracefully on startup

This commit is contained in:
2026-02-22 12:15:31 +01:00
parent 87bf0d71cd
commit bbf0a0815a
2 changed files with 13 additions and 0 deletions

View File

@@ -125,6 +125,14 @@ def get_series_app() -> SeriesApp:
import tempfile
anime_dir = tempfile.gettempdir()
settings.anime_directory = anime_dir
else:
raise HTTPException(
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
detail=(
f"Anime directory does not exist: {anime_dir}. "
"Please configure a valid path."
),
)
_series_app = SeriesApp(anime_dir)
except Exception as e: