Files
Aniworld/src/server/providers/streaming/Provider.py
Lukas 5526ab884a refactor: restructure core→server, split large entity files into database module
- Move src/core/ → src/server/
- Split SerieList.py (531 lines) and series.py (414 lines) into src/server/database/
- Add database/models.py for SQLAlchemy models
- Update all test imports to reflect new structure
- Remove deprecated test files (test_serie_class.py, test_serie_folder_with_year.py)
2026-06-04 21:11:53 +02:00

28 lines
806 B
Python

from abc import ABC, abstractmethod
from typing import Any
class Provider(ABC):
"""Abstract base class for streaming providers."""
@abstractmethod
def get_link(
self, embedded_link: str, timeout: int
) -> tuple[str, dict[str, Any]]:
"""
Extract direct download link from embedded player link.
Args:
embedded_link: URL of the embedded player
timeout: Request timeout in seconds
Returns:
Tuple of (direct_link: str, headers: dict)
- direct_link: Direct URL to download resource
- headers: Dictionary of HTTP headers to use for download
"""
raise NotImplementedError(
"Streaming providers must implement get_link"
)