diff --git a/claim_wall.md b/claim_wall.md index 5d841c9..e707ed1 100644 --- a/claim_wall.md +++ b/claim_wall.md @@ -35,20 +35,20 @@ Then removed his comment from civitai, but his post on reddit is still there, so ![](img/user_claim_wall/css_issue_part4.jpg) -### **Blame SD Webui's changing to this extension** -(Latest SD webui removed a button from UI, they claim this extension did that, and want it back by this extension) +### **Blame SD Webui's modification to this extension** +Latest SD webui removed a button from UI, they claim this extension did that, and want it back by this extension ![](img/user_claim_wall/blame_sdweui_update_to_this_ext.jpg) -### Don't even use this extension, claim other extension's error to this extension +### Claim other extension's error to this extension Just because both extensions have "Civitai" in extension's name ![](img/user_claim_wall/do_not_even_use_this_ext.jpg) -### **Didn't re-launch SD webui like document asked** +### **Didn't even use this extension and request a feature it already has** -![](img/user_claim_wall/did_not_relaunch_sdwebui.jpg) +![](img/user_claim_wall/request_a_feature_it_already_has.jpg) ### **Renamed model folder's name carelessly and forgot that** Takes about 8 hours to find out why this extension doesn't work on his SDwebui and ready to re-install SD webui from beginning. diff --git a/scripts/ch_lib/downloader.py b/scripts/ch_lib/downloader.py index 8febb7f..2b14ebc 100644 --- a/scripts/ch_lib/downloader.py +++ b/scripts/ch_lib/downloader.py @@ -59,10 +59,20 @@ def dl(url, folder, filename, filepath): util.printD("Target file path: " + file_path) + base, ext = os.path.splitext(file_path) + + # check if file is already exist + count = 2 + new_base = base + while os.path.isfile(file_path): + util.printD("Target file already exist.") + # re-name + new_base = base + "_" + str(count) + file_path = new_base + ext + count += 1 # use a temp file for downloading - base, ext = os.path.splitext(file_path) - dl_file_path = base+dl_ext + dl_file_path = new_base+dl_ext util.printD(f"Downloading to temp file: {dl_file_path}") diff --git a/scripts/ch_lib/util.py b/scripts/ch_lib/util.py index f3b1130..391cf12 100644 --- a/scripts/ch_lib/util.py +++ b/scripts/ch_lib/util.py @@ -6,7 +6,7 @@ import requests import shutil -version = "1.6.1.1" +version = "1.6.2" 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'}