fix(middleware): prevent premature redirect to /login during loading

Users were incorrectly redirected to /login during the initial loading phase
before the loading was actually complete. Added loading_started and
loading_complete flags to properly track the initialization state so
the setup redirect middleware knows when it's safe to redirect.
This commit is contained in:
2026-06-07 20:23:11 +02:00
parent b800158648
commit de250bdd37
5 changed files with 43 additions and 7 deletions

View File

@@ -108,6 +108,7 @@ The middleware checks the current state and redirects accordingly:
| Flag | Purpose |
|------|---------|
| `setup_complete` | Initial configuration was saved |
| `loading_started` | Loading phase has been initiated (redirected to /loading) |
| `unresolved_completed` | User clicked "Done" on unresolved page |
| `loading_complete` | Series scan + initial loading finished |
| `nfo_scan_complete` | Final NFO scan finished |

View File

@@ -1,3 +1,7 @@
API key : 299ae8f630a31bda814263c551361448
9bc3e547caff878615cbdba2cc421d37
/setup
SeriesApp initialized for directory: