Author |
Message |
![[Post New]](/jaikozforum/templates/default/images/icon_minipost_new.gif) 30/12/2016 14:46:03
|
mogodon
Pro
Joined: 04/11/2013 14:17:04
Messages: 45
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
|
|
 |
![[Post New]](/jaikozforum/templates/default/images/icon_minipost_new.gif) 30/12/2016 14:47:26
|
paultaylor
Pro
![[Avatar]](/jaikozforum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 21/08/2006 09:21:27
Messages: 7642
Offline
|
What is your actual mask line ?
|
thanks Paul (Administrator) |
|
 |
![[Post New]](/jaikozforum/templates/default/images/icon_minipost_new.gif) 30/12/2016 19:53:54
|
mogodon
Pro
Joined: 04/11/2013 14:17:04
Messages: 45
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 : '')
|
|
 |
![[Post New]](/jaikozforum/templates/default/images/icon_minipost_new.gif) 31/12/2016 04:14:56
|
paultaylor
Pro
![[Avatar]](/jaikozforum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 21/08/2006 09:21:27
Messages: 7642
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) |
|
 |
![[Post New]](/jaikozforum/templates/default/images/icon_minipost_new.gif) 31/12/2016 08:51:30
|
mogodon
Pro
Joined: 04/11/2013 14:17:04
Messages: 45
Offline
|
Ah, that makes sense. Ok I'll give that a shot. Cheers
|
|
 |
![[Post New]](/jaikozforum/templates/default/images/icon_minipost_new.gif) 31/12/2016 10:12:31
|
mogodon
Pro
Joined: 04/11/2013 14:17:04
Messages: 45
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
|
|
 |
![[Post New]](/jaikozforum/templates/default/images/icon_minipost_new.gif) 02/01/2017 05:05:19
|
paultaylor
Pro
![[Avatar]](/jaikozforum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 21/08/2006 09:21:27
Messages: 7642
Offline
|
Not currently, we have an issue for that
|
thanks Paul (Administrator) |
|
 |
|