ignore video preview
parent
bba0b515a1
commit
7f5707c0e1
|
|
@ -226,6 +226,9 @@ Since v1.5.5, we've already optimized the SHA256 function to the top. So the onl
|
|||
|
||||
|
||||
# Change Log
|
||||
## v1.9.1
|
||||
* Ignore video preview from civitai
|
||||
|
||||
## v1.9.0
|
||||
* support civitai API key for downloading. Check document for detail
|
||||
|
||||
|
|
|
|||
|
|
@ -347,6 +347,11 @@ def get_preview_image_by_model_path(model_path:str, max_size_preview, skip_nsfw_
|
|||
if skip_nsfw_preview:
|
||||
util.printD("Skip NSFW image")
|
||||
continue
|
||||
|
||||
preview_type = img_dict.get("type")
|
||||
if preview_type != "image":
|
||||
util.printD(f"Unsupported preview type: {preview_type}, ignore.")
|
||||
continue
|
||||
|
||||
if "url" in img_dict.keys():
|
||||
img_url = img_dict["url"]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import requests
|
|||
import shutil
|
||||
|
||||
|
||||
version = "1.9.0"
|
||||
version = "1.9.1"
|
||||
|
||||
def_headers = {'User-Agent': 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
|
||||
"Authorization": ""}
|
||||
|
|
|
|||
Loading…
Reference in New Issue