Ignore files whose hashes we can't get
This commit is contained in:
parent
f87bdc7d35
commit
d78b0cfd94
@ -44,6 +44,9 @@ def odysee_get_releases(handle):
|
||||
# So we should check to see what it is and ignore it if it's something dumb
|
||||
if item["value"].get("stream_type") == "video":
|
||||
continue
|
||||
# If we can't hash the file, it's not a file we want
|
||||
if not item["value"].get("source", {}).get("hash"):
|
||||
continue
|
||||
releases[item["claim_id"]] = {
|
||||
"name": item.get("name", "Unnamed Release"),
|
||||
"title": item["value"].get("title", "Untitled Release"),
|
||||
@ -52,7 +55,7 @@ def odysee_get_releases(handle):
|
||||
"description": item["value"].get("description", "No description provided for this release"),
|
||||
"thumbnail": item["value"].get("thumbnail", {}).get("url", ""),
|
||||
"url": f"{odysee_get_channel_url(handle)}/{item['name']}",
|
||||
"filehash": item["value"].get("source", {}).get("hash", "NOHASH")
|
||||
"filehash": item["value"].get("source", {}).get("hash", "")
|
||||
}
|
||||
if i == lastpage:
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user