test isses fixes

This commit is contained in:
2025-10-20 22:46:03 +02:00
parent d143d56d8b
commit 2e57c4f424
7 changed files with 376 additions and 97 deletions

View File

@@ -21,8 +21,8 @@ router = APIRouter(prefix="/api/queue", tags=["download"])
@router.get("/status", response_model=QueueStatusResponse)
async def get_queue_status(
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Get current download queue status and statistics.
@@ -60,8 +60,8 @@ async def get_queue_status(
)
async def add_to_queue(
request: DownloadRequest,
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Add episodes to the download queue.
@@ -121,8 +121,8 @@ async def add_to_queue(
@router.delete("/completed", status_code=status.HTTP_200_OK)
async def clear_completed(
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Clear completed downloads from history.
@@ -156,8 +156,8 @@ async def clear_completed(
@router.delete("/{item_id}", status_code=status.HTTP_204_NO_CONTENT)
async def remove_from_queue(
item_id: str = Path(..., description="Download item ID to remove"),
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Remove a specific item from the download queue.
@@ -200,8 +200,8 @@ async def remove_from_queue(
@router.delete("/", status_code=status.HTTP_204_NO_CONTENT)
async def remove_multiple_from_queue(
request: QueueOperationRequest,
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Remove multiple items from the download queue.
@@ -246,8 +246,8 @@ async def remove_multiple_from_queue(
@router.post("/start", status_code=status.HTTP_200_OK)
async def start_queue(
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Start the download queue processor.
@@ -280,8 +280,8 @@ async def start_queue(
@router.post("/stop", status_code=status.HTTP_200_OK)
async def stop_queue(
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Stop the download queue processor.
@@ -314,8 +314,8 @@ async def stop_queue(
@router.post("/pause", status_code=status.HTTP_200_OK)
async def pause_queue(
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Pause the download queue processor.
@@ -347,8 +347,8 @@ async def pause_queue(
@router.post("/resume", status_code=status.HTTP_200_OK)
async def resume_queue(
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Resume the download queue processor.
@@ -381,8 +381,8 @@ async def resume_queue(
@router.post("/reorder", status_code=status.HTTP_200_OK)
async def reorder_queue(
request: QueueReorderRequest,
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Reorder an item in the pending queue.
@@ -436,8 +436,8 @@ async def reorder_queue(
@router.post("/retry", status_code=status.HTTP_200_OK)
async def retry_failed(
request: QueueOperationRequest,
download_service: DownloadService = Depends(get_download_service),
_: dict = Depends(require_auth),
download_service: DownloadService = Depends(get_download_service),
):
"""Retry failed downloads.