fix: handle missing anime directory gracefully on startup
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user