From 7aebaf0adef36fdf51ee634e3f7f58febf164319 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Fri, 19 Aug 2022 21:34:31 +0200 Subject: [PATCH] Added padSingleDigit option --- deemix/settings.js | 1 + deemix/utils/pathtemplates.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deemix/settings.js b/deemix/settings.js index 5c2ec58..45c65e5 100644 --- a/deemix/settings.js +++ b/deemix/settings.js @@ -35,6 +35,7 @@ const DEFAULTS = { createStructurePlaylist: false, createSingleFolder: false, padTracks: true, + padSingleDigit: true, paddingSize: "0", illegalCharacterReplacer: "_", queueConcurrency: 3, diff --git a/deemix/utils/pathtemplates.js b/deemix/utils/pathtemplates.js index 52a55eb..e2847ef 100644 --- a/deemix/utils/pathtemplates.js +++ b/deemix/utils/pathtemplates.js @@ -50,7 +50,7 @@ function pad(num, max_val, settings) { } else{ paddingSize = ((10 ** (parseInt(settings.paddingSize) - 1))+"").length } - if (paddingSize == 1) paddingSize = 2 + if (settings.padSingleDigit && paddingSize == 1) paddingSize = 2 if (settings.padTracks) return (num+"").padStart(paddingSize, "0") return (num+"")