SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

rename mask help

I am trying to setup the rename mask but am running into an issue.

I am trying to get the disk and track number combined at the start of the filenames with multi disks but during the preview (I haven’t tried to run it commiting the changes yet), it is adding undefined for multi disc albums.

01undefined02 - The McCoys - Hang on Sloopy.flac

ifnotempty2(albumartist,"Various Artists",'/')
+ ifnotempty(album,' ')
+ '(' + (year.length>4 ? year.substring(0,4):year) +')/'
+ ifmultidisc(ifnotempty(discno),'')
+ ifnotempty(pad(trackno,2),' - ')
+ ifnotempty(artist,' - ')
+ title

  1. Click on the Edit button on the File Naming tab
  2. Look at the Javascript Functions drop down at the bottom, is ifmultidisc missing ?
  3. If it , click on the Add button, and paste i the following
function ifmultidisc(value) {
   if(disctotal>1)
   {
      return value;
   }
   else
   {
      return "";
   }
}

  1. Click on OK, OK again and then Start, it should work this time

I checked and that is there and exactly as you posted.

I tried to run it with saving just to make sure it wasn’t a preview issue and it won’t let me undue the changes using “Find songs that were originally in the selected locations”. Thankfully it was only a test on a couple of albums.
edit- I changed the folder to where they were moved to and used “Find songs that are currently in the selected locations” and that worked.