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:
parent
77aa9598a0
commit
4bf2072279
@ -57,6 +57,10 @@ if __name__ == "__main__":
|
|||||||
fumen, convertedTJAs = main(fnameTJA=fnameTJA)
|
fumen, convertedTJAs = main(fnameTJA=fnameTJA)
|
||||||
|
|
||||||
for course, song in convertedTJAs.items():
|
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")
|
outputFile = open(outputName, "wb")
|
||||||
writeFumen(outputFile, song)
|
writeFumen(outputFile, song)
|
||||||
|
Loading…
Reference in New Issue
Block a user