Fix incorrect player number targetting if player name contains P

This commit is contained in:
Fabian Dill 2020-08-10 09:17:21 +02:00
parent f0666f7ea8
commit dbf7a185d9
1 changed files with 1 additions and 1 deletions

View File

@ -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()