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



Joined: 12/07/2010 08:23:31
Messages: 8
Offline

I want to add a "Disk" folder to the sub folder path but only on multi disk albums.

So a single disk release would be like:
Artist / Album / File.mp3

A Multi Disk release would be like:
Artist / Album / Disk 1 /File.mp3
Artist / Album / Disk 2 / File.mp3

How would I do this?
paultaylor

Pro
[Avatar]

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

Modify Preferences:File and Folder Correct:Rename Folder form Metadata:Rename Mask to

Code:
 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:'' ;
  }
  
 function ifmultidisc(value) {
    if(disctotal>1)
    {
       return value;
    }
    else
    {
       return "";
    }
 }
 
 ifnotempty(albumartist,folderseparator) 
 + ifnotempty(album,folderseparator)
 + ifmultidisc('Disk ' + discno)
 


(This is easier in SongKong where we have a number of predefined masks, and I plan the same thing for Jaikoz)

thanks Paul (Administrator)
Sat32



Joined: 12/07/2010 08:23:31
Messages: 8
Offline

After I posted this I did some more forum searching and found something that i could adapt and got it to work.


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:'' ;
}

function ifmultidisc(value) {
if(disctotal>1)
{
return value;
}
else
{
return "";
}
}

ifnotempty2(media,"Unknown",folderseparator) + ifnotempty2(albumartist,artist,folderseparator) + ifnotempty(album,folderseparator) + ifmultidisc("Disk ","") + ifmultidisc(discno,folderseparator)

For anyone else trying to do this
husker

Enthusiast

Joined: 16/01/2016 23:09:52
Messages: 15
Offline

I've really been struggling with the JavaScript for the folder and file renaming as well. If you could be so kind, could you provide some assistance with this:


A single disc release would be like:
Artist/Year - Album/Track# - Title.mp3

A Multi Disc release would be like:
Artist/Year - Album/Disc 1/Track# - Title.mp3
Artist/Year - Album/Disc 2/Track# - Title.mp3

Compilations only slightly different:

A single disc release would be like:
Various Artists/Year - Album/Track# - Artist - Title.mp3

A Multi Disc release would be like:
Various Artists/Year - Album/Disc 1/Track# - Artist - Title.mp3
Various Artists/Year - Album/Disc 2/Track# - Artist - Title.mp3

*I guess the Various Artists would be the album artist (that is the way I will set them up - all equal "Various Artists)

Thank you.
Sat32



Joined: 12/07/2010 08:23:31
Messages: 8
Offline

I'm struggling with how to handle the various artists thing as well. As for the java thing my skill level is copy and pasting others code and praying it works.

Sorry
husker

Enthusiast

Joined: 16/01/2016 23:09:52
Messages: 15
Offline

So I'm not the only one with simple copy and paste skills.
 
Forum Index -> Jaikoz Questions
Go to:   
Powered by JForum 2.1.6 © JForum Team