Added padSingleDigit option

This commit is contained in:
RemixDev 2022-08-19 21:34:31 +02:00
parent 2d426d850d
commit 7aebaf0ade
No known key found for this signature in database
GPG key ID: B33962B465BDB51C
2 changed files with 2 additions and 1 deletions

View file

@ -35,6 +35,7 @@ const DEFAULTS = {
createStructurePlaylist: false,
createSingleFolder: false,
padTracks: true,
padSingleDigit: true,
paddingSize: "0",
illegalCharacterReplacer: "_",
queueConcurrency: 3,

View file

@ -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+"")