Keep all "." in player name except ".yaml"

This commit is contained in:
CaitSith2 2021-03-13 15:15:12 -08:00
parent 28b2afe022
commit 00feff6b56
1 changed files with 2 additions and 2 deletions

View File

@ -188,7 +188,7 @@ def main(args=None, callback=ERmain):
if path == args.weights:
settings.name = f"Player{player}"
elif not settings.name:
settings.name = os.path.split(path)[-1].split(".")[0]
settings.name = ".".join(os.path.split(path)[-1].split(".")[0:-1])
if "-" not in settings.shuffle and settings.shuffle != "vanilla":
settings.shuffle += f"-{random.randint(0, 2 ** 64)}"
@ -214,7 +214,7 @@ def main(args=None, callback=ERmain):
if path == args.weights: # if name came from the weights file, just use base player name
erargs.name[player] = f"Player{player}"
elif not erargs.name[player]: # if name was not specified, generate it from filename
erargs.name[player] = os.path.split(path)[-1].split(".")[0]
erargs.name[player] = ".".join(os.path.split(path)[-1].split(".")[0:-1])
new_name = []
name_counter[erargs.name[player]] += 1
for name in erargs.name[player].split("%%"):