Merge branch 'main' into breaking_changes

# Conflicts:
#	BaseClasses.py
#	Mystery.py
#	WebHostLib/downloads.py
#	WebHostLib/models.py
#	WebHostLib/templates/macros.html
#	WebHostLib/upload.py
#	worlds/alttp/ItemPool.py
#	worlds/alttp/Main.py
This commit is contained in:
Fabian Dill
2021-01-17 06:50:25 +01:00
35 changed files with 965 additions and 187 deletions

View File

@@ -39,7 +39,8 @@ def uploads():
if file.filename.endswith(banned_zip_contents):
return "Uploaded data contained a rom file, which is likely to contain copyrighted material. Your file was deleted."
elif file.filename.endswith(".apbp"):
player = int(file.filename.split("P")[1].split(".")[0].split("_")[0])
splitted = file.filename.split("/")[-1][3:].split("P", 1)
player = int(splitted[1].split(".")[0].split("_")[0])
patches.add(Patch(data=zfile.open(file, "r").read(), player=player))
elif file.filename.endswith(".txt"):
spoiler = zfile.open(file, "r").read().decode("utf-8-sig")