[Logo] Jaikoz and SongKong Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Folder Rename Mask Help  XML
Forum Index -> Jaikoz Questions
Author Message
mogodon

Pro

Joined: 04/11/2013 14:17:04
Messages: 33
Offline

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
paultaylor

Pro
[Avatar]

Joined: 21/08/2006 09:21:27
Messages: 7217
Offline

What is your actual mask line ?

thanks Paul (Administrator)
mogodon

Pro

Joined: 04/11/2013 14:17:04
Messages: 33
Offline

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 : '')
paultaylor

Pro
[Avatar]

Joined: 21/08/2006 09:21:27
Messages: 7217
Offline

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

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

thanks Paul (Administrator)
mogodon

Pro

Joined: 04/11/2013 14:17:04
Messages: 33
Offline

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

Pro

Joined: 04/11/2013 14:17:04
Messages: 33
Offline

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
paultaylor

Pro
[Avatar]

Joined: 21/08/2006 09:21:27
Messages: 7217
Offline

Not currently, we have an issue for that

thanks Paul (Administrator)
 
Forum Index -> Jaikoz Questions
Go to:   
Powered by JForum 2.1.6 © JForum Team