SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

File rename mask

Here is the default file rename mask form a clean new installation of Jaikoz,
How do I move the track # portion to the end?

function pad(number, length) {
if (number == ‘’) { return ‘’;}
var str = ‘’ + number;
while (str.length < length) {
str = ‘0’ + str;
}
return str;
}

function ifnotempty(value,sep){
return value.length > 0 ? value + sep : ‘’;
}

function ifnotempty2(value1,value2,sep){
return value1.length > 0 ? value1 + sep :value2.length > 0 ? value2 + sep:’’ ;
}

ifnotempty2(albumartist,artist,’ - ‘) + ifnotempty(album,’ - ‘) + ifnotempty(pad(trackno,2),’ - ') + title

Most of the output is just functions that can be used by the rename mask, the last night is the rename mask itself simply swap the order around

i.e.

ifnotempty2(albumartist,artist,’ - ‘) + ifnotempty(album,’ - ‘) + title +ifnotempty(pad(trackno,2),’ - ')