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
|
# Change Log
|
||||||
|
## v1.9.1
|
||||||
|
* Ignore video preview from civitai
|
||||||
|
|
||||||
## v1.9.0
|
## v1.9.0
|
||||||
* support civitai API key for downloading. Check document for detail
|
* support civitai API key for downloading. Check document for detail
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -348,6 +348,11 @@ def get_preview_image_by_model_path(model_path:str, max_size_preview, skip_nsfw_
|
||||||
util.printD("Skip NSFW image")
|
util.printD("Skip NSFW image")
|
||||||
continue
|
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():
|
if "url" in img_dict.keys():
|
||||||
img_url = img_dict["url"]
|
img_url = img_dict["url"]
|
||||||
if max_size_preview:
|
if max_size_preview:
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import requests
|
||||||
import shutil
|
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',
|
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": ""}
|
"Authorization": ""}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue