Skip to content

Commit

Permalink
fixed a bad bool
Browse files Browse the repository at this point in the history
  • Loading branch information
lunamidori5 committed Dec 17, 2024
1 parent d9855f5 commit 775df30
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions Webserver/Programs/Downloader/helper_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ async def main():
base_url = "https://tea-cup.midori-ai.xyz/download/"
filename = args.filename
usermode = bool(args.usermode)
pre_unsafe = bool(args.unsafe)
key_filename = f"{random_id}-key.txt"

pre_unsafe = str(args.unsafe).lower()

if os.path.exists(args.output or filename):
log(f"File Already Downloaded, removing file and redownloading...")
Expand All @@ -148,22 +148,15 @@ async def main():
else:
os.remove(filename)

trys = 0

key_url = f"{base_url}{key_filename}"

if pre_unsafe == "true":
trys = 16
encrypted_file_url = f"{base_url}{filename}"
else:
encrypted_file_url = f"{base_url}ai/{filename}"


encrypted_file_url = f"{base_url}ai/{filename}"
usermode_file_url = f"{base_url}user"
backup_file_url = f"{base_url}{filename}"

print(f"checking usermode: {usermode}")
trys = 0

if usermode:
print("Entering Usermode")
trys = 16
backup_file_url = usermode_file_url

Expand All @@ -172,6 +165,9 @@ async def main():

if not is_api_key_loaded():
trys = 16

if pre_unsafe:
trys = 16

while trys < 18:
try:
Expand Down

0 comments on commit 775df30

Please sign in to comment.