From ebaa8b0191a78de76db1eedca95bb2179e0166f0 Mon Sep 17 00:00:00 2001 From: Bob Swift Date: Wed, 5 May 2021 17:44:53 -0600 Subject: [PATCH] Pad disc number if more than nine discs --- picard/const/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/picard/const/__init__.py b/picard/const/__init__.py index 3690b67e7..8239fefbd 100644 --- a/picard/const/__init__.py +++ b/picard/const/__init__.py @@ -14,6 +14,7 @@ # Copyright (C) 2018 Bob Swift # Copyright (C) 2018 Vishal Choudhary # Copyright (C) 2020 RomFouq +# Copyright (C) 2021 Bob Swift # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -176,7 +177,7 @@ PROGRAM_UPDATE_LEVELS = OrderedDict( DEFAULT_FILE_NAMING_FORMAT = "$if2(%albumartist%,%artist%)/\n" \ "$if(%albumartist%,%album%/,)\n" \ - "$if($gt(%totaldiscs%,1),%discnumber%-,)" \ + "$if($gt(%totaldiscs%,1),$if($gt(%totaldiscs%,9),$num(%discnumber%,2),%discnumber%)-,)" \ "$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) ,)" \ "$if(%_multiartist%,%artist% - ,)" \ "%title%"