SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Folder Rename Mask Help

Hi

I thought I’d have another go at using the folder/file rename masks on Jaikoz as I’m fed up having to load the tagged files into mp3tag to move them to their end folders.

What I’m looking for is:

%albumartistsort%\%year% - %album%\'disc '%discno% (if more than one disc)\%trackno% - %title%

e.g.

Using http://musicbrainz.org/release-group/53b0d89e-f856-3015-a3a6-a70e1e935fd6

For original release of U2’s Boy

U2\1980 - Boy\01 - I Will Follow

For 2008 Re-issue of U2’s Boy

U2\2008 - Boy\Disc 1\01 - I Will Follow

I edited the javascript file as follows:

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(albumartistsort,artistsort,folderseparator) + ifnotempty(year," - " + album,folderseparator) + (disctotal>1 ? discno + folderseparator : ‘’)

This works fine if there is only one disc but when there are 2 or more gives me folders like:

U2\2008 - Boy1
U2\2008 - Boy2

I thought by putting the folderseparator after album it would give me U2\2008 - Boy\Disc 1\…

Any ideas?

Cheers

What is your actual mask line ?

As above

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(albumartistsort,artistsort,folderseparator) + ifnotempty(year," - " + album,folderseparator) + (disctotal>1 ? discno + folderseparator : ‘’)

Hi its because ifEmpty() only takes two parameters but you have given it three, so it ignores the third one (the folder seperator), also nowhere do you ask it to output ‘Disc’, try replacing the last line with

ifnotempty2(albumartistsort,artistsort,folderseparator) + ifnotempty(year, " - " + album + folderseparator) + (disctotal>1 ? 'Disc' + discno + folderseparator : '')

Ah, that makes sense. Ok I’ll give that a shot. Cheers

Works a treat.

One other question, “move associated files” only moves from the folder level that holds the music files. Is there any way to get it to move a subfolder too (or the containing files) where the stricture is something like:

Albumx\01 - Song.mp3
Albumx\artwork\cover.jpg

Not currently, we have an issue for that