1
0
mirror of synced 2024-11-27 22:40:49 +01:00

main.py: Don't append course ID if tja has only 1 course

This replicates the behavior of the original tja2bin.exe
This commit is contained in:
Viv 2023-06-03 11:04:57 -04:00
parent 77aa9598a0
commit 4bf2072279

View File

@ -57,6 +57,10 @@ if __name__ == "__main__":
fumen, convertedTJAs = main(fnameTJA=fnameTJA)
for course, song in convertedTJAs.items():
outputName = os.path.splitext(fnameTJA)[0] + f"_{COURSE_IDS[course]}.bin"
outputName = os.path.splitext(fnameTJA)[0]
if len(convertedTJAs) == 1:
outputName += ".bin"
else:
outputName += f"_{COURSE_IDS[course]}.bin"
outputFile = open(outputName, "wb")
writeFumen(outputFile, song)