From d5f4952010b0cf8886d13e0f0cc0061191416722 Mon Sep 17 00:00:00 2001 From: Chris Putnam Date: Fri, 8 Sep 2023 04:49:43 -0500 Subject: [PATCH] in split mode, use correct naming convention for single track discs --- binmerge | 3 +++ 1 file changed, 3 insertions(+) diff --git a/binmerge b/binmerge index bf72147..0770807 100755 --- a/binmerge +++ b/binmerge @@ -177,11 +177,14 @@ def cuestamp_to_sectors(stamp): def track_filename(prefix, track_num, track_count): # Redump is strangely inconsistent in their datfiles and cuesheets when it # comes to track numbers. The naming convention currently seems to be: + # If there is exactly one track: "" (nothing) # If there are less than 10 tracks: "Track 1", "Track 2", etc. # If there are more than 10 tracks: "Track 01", "Track 02", etc. # # It'd be nice if it were consistently %02d! # + if track_count == 1: + return "%s.bin" if track_count > 9: return "%s (Track %02d).bin" % (prefix, track_num) return "%s (Track %d).bin" % (prefix, track_num)