Update PVideoDl to support custom download strategies and enhance cookie handling. Added new downloader registration system, updated README for clarity on downloaders, and introduced cookies configuration in settings. Frontend now includes a dedicated tab for download strategies and API endpoints for listing them.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
"""Роут со списком зарегистрированных загрузчиков: GET /api/downloaders."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from app.models import DownloaderInfo
|
||||
from app.services.downloader import list_strategies
|
||||
|
||||
router = APIRouter(prefix="/api/downloaders", tags=["downloaders"])
|
||||
|
||||
|
||||
@router.get("", response_model=list[DownloaderInfo])
|
||||
async def list_downloaders() -> list[dict]:
|
||||
"""Какие стратегии скачивания сейчас загружены (по убыванию приоритета)."""
|
||||
return list_strategies()
|
||||
Reference in New Issue
Block a user