This commit is contained in:
2026-03-25 22:39:30 -07:00
parent c31402c8f1
commit 562acd809c
46 changed files with 2367 additions and 1868 deletions

View File

@@ -15,6 +15,7 @@ from API.HTTP import HTTPClient, _download_direct_file
from API.alldebrid import AllDebridClient, parse_magnet_or_hash, is_torrent_file
from ProviderCore.base import Provider, SearchResult
from SYS.provider_helpers import TableProviderMixin
from SYS.item_accessors import get_field as _extract_value
from SYS.utils import sanitize_filename
from SYS.logger import log, debug
from SYS.models import DownloadError, PipeObject
@@ -339,25 +340,6 @@ def _looks_like_torrent_source(candidate: str) -> bool:
return False
def _extract_value(source: Any, field: str) -> Any:
if source is None:
return None
if isinstance(source, dict):
if field in source:
return source.get(field)
else:
try:
value = getattr(source, field)
except Exception:
value = None
if value is not None:
return value
extra = getattr(source, "extra", None)
if isinstance(extra, dict) and field in extra:
return extra.get(field)
return None
def _dispatch_alldebrid_magnet_search(
magnet_id: int,
config: Dict[str, Any],