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)
This commit is contained in:
27
src/server/providers/streaming/Provider.py
Normal file
27
src/server/providers/streaming/Provider.py
Normal file
@@ -0,0 +1,27 @@
|
||||
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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user