update alldebrid plugin
This commit is contained in:
+16
-1
@@ -1460,6 +1460,8 @@ class Download_File(Cmdlet):
|
||||
) -> List[Dict[str, Any]]:
|
||||
if not canonical_url:
|
||||
return []
|
||||
if not cls._supports_storage_duplicate_lookup(canonical_url):
|
||||
return []
|
||||
|
||||
config_dict = config if isinstance(config, dict) else {}
|
||||
refs: List[Dict[str, Any]] = []
|
||||
@@ -1691,6 +1693,20 @@ class Download_File(Cmdlet):
|
||||
|
||||
return storage, hydrus_available
|
||||
|
||||
@staticmethod
|
||||
def _supports_storage_duplicate_lookup(raw_url: str) -> bool:
|
||||
text = str(raw_url or "").strip()
|
||||
if not text:
|
||||
return False
|
||||
|
||||
try:
|
||||
parsed = urlparse(text)
|
||||
except Exception:
|
||||
parsed = None
|
||||
|
||||
scheme = str(getattr(parsed, "scheme", "") or "").strip().lower()
|
||||
return scheme in {"http", "https", "ftp", "ftps"}
|
||||
|
||||
@staticmethod
|
||||
def _filter_supported_urls(raw_urls: Sequence[str]) -> tuple[List[str], List[str]]:
|
||||
"""Split explicit URLs into supported and unsupported buckets."""
|
||||
@@ -2690,7 +2706,6 @@ class Download_File(Cmdlet):
|
||||
self._maybe_render_download_details(config=config)
|
||||
return 0
|
||||
|
||||
log("No downloads completed", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user