df
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
This commit is contained in:
@@ -110,7 +110,12 @@ def is_download_file_url(url: str) -> bool:
|
||||
if not host.endswith("archive.org"):
|
||||
return False
|
||||
# /download/<identifier>/<filename>
|
||||
return len(parts) >= 3 and parts[0].lower() == "download" and bool(parts[1].strip()) and bool(parts[2].strip())
|
||||
return (
|
||||
len(parts) >= 3
|
||||
and parts[0].lower() == "download"
|
||||
and bool(parts[1].strip())
|
||||
and bool(parts[2].strip())
|
||||
)
|
||||
|
||||
|
||||
def list_download_files(identifier: str) -> List[Dict[str, Any]]:
|
||||
@@ -482,12 +487,14 @@ class InternetArchive(Provider):
|
||||
name = f.get("name")
|
||||
if not name:
|
||||
continue
|
||||
files.append({
|
||||
"name": str(name),
|
||||
"size": getattr(f, "size", None),
|
||||
"format": getattr(f, "format", None),
|
||||
"source": getattr(f, "source", None),
|
||||
})
|
||||
files.append(
|
||||
{
|
||||
"name": str(name),
|
||||
"size": getattr(f, "size", None),
|
||||
"format": getattr(f, "format", None),
|
||||
"source": getattr(f, "source", None),
|
||||
}
|
||||
)
|
||||
except Exception:
|
||||
files = []
|
||||
|
||||
@@ -657,7 +664,9 @@ class InternetArchive(Provider):
|
||||
if pipe_obj is not None:
|
||||
from Store import Store
|
||||
|
||||
Store(self.config, suppress_debug=True).try_add_url_for_pipe_object(pipe_obj, item_url)
|
||||
Store(self.config, suppress_debug=True).try_add_url_for_pipe_object(
|
||||
pipe_obj, item_url
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user