apply P number targeting fix to uploads
This commit is contained in:
parent
4c3f5188e4
commit
74179308ec
|
@ -39,7 +39,7 @@ 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(".bmbp"):
|
||||
player = int(file.filename.split("P")[-1].split(".")[0].split("_")[0])
|
||||
player = int(file.filename.split("P")[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, "rt").read().decode("utf-8-sig")
|
||||
|
|
Loading…
Reference in New Issue