Fix incorrect player number targetting if player name contains P
This commit is contained in:
parent
f0666f7ea8
commit
dbf7a185d9
|
@ -89,7 +89,7 @@ def upload_to_db(folder):
|
|||
for file in os.listdir(folder):
|
||||
file = os.path.join(folder, file)
|
||||
if file.endswith(".bmbp"):
|
||||
player = int(file.split("P")[-1].split(".")[0].split("_")[0])
|
||||
player = int(file.split("P")[1].split(".")[0].split("_")[0])
|
||||
patches.add(Patch(data=open(file, "rb").read(), player=player))
|
||||
elif file.endswith(".txt"):
|
||||
spoiler = open(file, "rt").read()
|
||||
|
|
Loading…
Reference in New Issue