Fix up if "http" in ...: to be more sensible startswiths

This commit is contained in:
Aarni Koskela
2023-05-29 09:41:36 +03:00
parent 89352a2f52
commit 0afbc0c235
5 changed files with 8 additions and 8 deletions

View File

@@ -25,7 +25,7 @@ def gfpgann():
return None
models = modelloader.load_models(model_path, model_url, user_path, ext_filter="GFPGAN")
if len(models) == 1 and "http" in models[0]:
if len(models) == 1 and models[0].startswith("http"):
model_file = models[0]
elif len(models) != 0:
latest_file = max(models, key=os.path.getctime)