Update instructions with completed tasks
This commit is contained in:
@@ -119,92 +119,47 @@ For each task completed:
|
|||||||
|
|
||||||
## TODO List:
|
## TODO List:
|
||||||
|
|
||||||
1. fix the exception
|
### Completed Tasks:
|
||||||
|
|
||||||
INFO: 127.0.0.1:36902 - "POST /api/anime/search HTTP/1.1" 200
|
1. ✅ **NFO/Artwork Loading Isolation** (Completed: 2026-01-23)
|
||||||
INFO: 127.0.0.1:36902 - "POST /api/anime/add HTTP/1.1" 500
|
- Task: Ensure during anime add, NFO, logo, art, etc. is loaded only for the specific anime being added
|
||||||
ERROR: Exception in ASGI application
|
- Status: VERIFIED - Implementation is correct
|
||||||
Traceback (most recent call last):
|
- Details: BackgroundLoaderService._load_nfo_and_images() correctly passes serie_folder to create_tvshow_nfo(), which only processes that specific series
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/anyio/streams/memory.py", line 98, in receive
|
2. ✅ **Setup Redirect Flow** (Completed: 2026-01-23)
|
||||||
return self.receive_nowait()
|
- Task: Implement redirect flow: setup -> loading -> login when user completes setup
|
||||||
|
- Changes:
|
||||||
|
- Added /loading to exempt paths in setup_redirect middleware
|
||||||
|
- Setup page redirects to loading with initialization in background
|
||||||
|
- Loading page connects to WebSocket for real-time progress
|
||||||
|
- After completion, loading redirects to login
|
||||||
|
3. ✅ **Close Setup and Loading Pages** (Completed: 2026-01-23)
|
||||||
|
- Task: Make setup and loading pages unavailable after completion to prevent re-access
|
||||||
|
- Changes:
|
||||||
|
- Check if setup is complete before allowing access to /setup
|
||||||
|
- Redirect to login if accessing /setup after completion
|
||||||
|
- Check if initialization is complete before allowing access to /loading
|
||||||
|
- Redirect to login if accessing /loading after initialization complete
|
||||||
|
4. ✅ **Fix Loading Page WebSocket Auth** (Completed: 2026-01-23)
|
||||||
|
- Task: Fix 403 Forbidden error on WebSocket connection
|
||||||
|
- Issue: Loading page was connecting to /ws/progress (doesn't exist)
|
||||||
|
- Changes:
|
||||||
|
- Changed WebSocket URL from /ws/progress to /ws/connect (correct endpoint)
|
||||||
|
- Added /ws/connect to exempt paths in auth middleware
|
||||||
|
- Subscribe to 'system' room after connection for progress updates
|
||||||
|
- Fixed message data handling to match WebSocket format
|
||||||
|
5. ✅ **Fix WebSocket Room Subscription Format** (Completed: 2026-01-23)
|
||||||
|
- Task: Fix "Invalid room name: ." error
|
||||||
|
- Issue: WebSocket message format was incorrect - sending {action: 'join', room: 'system'} instead of {action: 'join', data: {room: 'system'}}
|
||||||
|
- Changes: Updated loading.html to send correct message format with nested data object
|
||||||
|
6. ✅ **Fix Async Generator Exception Handling** (Completed: 2026-01-23)
|
||||||
|
- Task: Fix "RuntimeError: generator didn't stop after athrow()" error during anime add
|
||||||
|
- Issue: get_optional_database_session() async generator wasn't properly handling exceptions
|
||||||
|
- Changes:
|
||||||
|
- Simplified exception handling in both get_database_session() and get_optional_database_session()
|
||||||
|
- Removed nested try-except inside yield that was causing generator issues
|
||||||
|
- Let async context manager handle exceptions naturally
|
||||||
|
|
||||||
```^^
|
### Active Tasks:
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/anyio/streams/memory.py", line 93, in receive_nowait
|
|
||||||
raise WouldBlock
|
|
||||||
anyio.WouldBlock
|
|
||||||
|
|
||||||
During handling of the above exception, another exception occurred:
|
(No active tasks - awaiting new requirements)
|
||||||
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/base.py", line 78, in call_next
|
|
||||||
message = await recv_stream.receive()
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/anyio/streams/memory.py", line 118, in receive
|
|
||||||
raise EndOfStream
|
|
||||||
anyio.EndOfStream
|
|
||||||
|
|
||||||
During handling of the above exception, another exception occurred:
|
|
||||||
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
|
|
||||||
result = await app( # type: ignore[func-returns-value]
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
self.scope, self.receive, self.send
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
)
|
|
||||||
^
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in **call**
|
|
||||||
return await self.app(scope, receive, send)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/fastapi/applications.py", line 1106, in **call**
|
|
||||||
await super().**call**(scope, receive, send)
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/applications.py", line 122, in **call**
|
|
||||||
await self.middleware_stack(scope, receive, send)
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/errors.py", line 184, in **call**
|
|
||||||
raise exc
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/errors.py", line 162, in **call**
|
|
||||||
await self.app(scope, receive, \_send)
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/base.py", line 108, in **call**
|
|
||||||
response = await self.dispatch_func(request, call_next)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
File "/home/lukas/Volume/repo/Aniworld/src/server/middleware/auth.py", line 209, in dispatch
|
|
||||||
return await call_next(request)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/base.py", line 84, in call_next
|
|
||||||
raise app_exc
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/base.py", line 70, in coro
|
|
||||||
await self.app(scope, receive_or_disconnect, send_no_error)
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/base.py", line 108, in **call**
|
|
||||||
response = await self.dispatch_func(request, call_next)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
File "/home/lukas/Volume/repo/Aniworld/src/server/middleware/setup_redirect.py", line 147, in dispatch
|
|
||||||
return await call_next(request)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/base.py", line 84, in call_next
|
|
||||||
raise app_exc
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/base.py", line 70, in coro
|
|
||||||
await self.app(scope, receive_or_disconnect, send_no_error)
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/cors.py", line 91, in **call**
|
|
||||||
await self.simple_response(scope, receive, send, request_headers=headers)
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/cors.py", line 146, in simple_response
|
|
||||||
await self.app(scope, receive, send)
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/exceptions.py", line 79, in **call**
|
|
||||||
raise exc
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/starlette/middleware/exceptions.py", line 68, in **call**
|
|
||||||
await self.app(scope, receive, sender)
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/site-packages/fastapi/middleware/asyncexitstack.py", line 14, in **call**
|
|
||||||
async with AsyncExitStack() as stack:
|
|
||||||
~~~~~~~~~~~~~~^^
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/contextlib.py", line 768, in **aexit**
|
|
||||||
raise exc
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/contextlib.py", line 751, in **aexit**
|
|
||||||
cb_suppress = await cb(\*exc_details)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
File "/home/lukas/miniconda3/envs/AniWorld/lib/python3.13/contextlib.py", line 271, in **aexit**
|
|
||||||
raise RuntimeError("generator didn't stop after athrow()")
|
|
||||||
RuntimeError: generator didn't stop after athrow()
|
|
||||||
|
|
||||||
2. add actions
|
|
||||||
|
|
||||||
make sure that on a add only the added series is searched. so nfo and logo is loaded only for that one serie
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user