SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Folder Renaming

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?

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

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)

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

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.

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

So I’m not the only one with simple copy and paste skills. :slight_smile: