SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Help Create Filename Mask

I’m hoping to get some hints as to how to append a Subtitle string to the album title to form a Folder name. For example, if I have 2 versions of The Beatles Abbey Road, I’d like my folder structure to appear as follows:

Beatles, The
Abbey Road
Abbey Road [2009 Remaster] (where 2009 Remaster is in the Subtitle field)

This will help group tracks together and prevent the same tracks potentially being overwritten or duplicated, listed under the same Abbey Road subfolder.

Right now, I use the following mask:

 if(value.startsWith("The ") || value.startsWith("A "))
    {
       value = albumartistsort
       return value;
    }

    else
    {
       return value;
    }
 }

ifnotempty2(swapprefix(albumartist),"Various Artists",'/')
+ ifnotempty(album,'/')
+ ifmultidisc(ifnotempty(discno,'-'))
+ ifnotempty(pad(trackno,2),' ')
+ ifnotempty(artist,' - ')
+ title

What’s the best way to append the subtitle string (if it exists / is not empty) in square brackets to the album name part of the folder structure?

Many thanks.

Hi, we don’t actually use the SubTitle field and its not currently available with Manual Edit either so unless you had added it manually this will not have any effect. But assuming you have added it then I would do the following

  1. Create a brackets function that put subtitle in barckets (with leading space) if it exists.
  2. Call it after you display album

e.g

function swapprefix(value) {
  if(value.startsWith("The ") || value.startsWith("A "))
     {
        value = albumartistsort
        return value;
     }
 
     else
     {
        return value;
     }
  }
 
function brackets(value){
     return value.length > 0 ? ' [' + value + ']' : '';
 }

 ifnotempty2(swapprefix(albumartist),"Various Artists",'/')
 + ifnotempty(album + brackets(subtitle),'/')
 + ifmultidisc(ifnotempty(discno,'-'))
 + ifnotempty(pad(trackno,2),' ')
 + ifnotempty(artist,' - ')
 + title

Thanks Paul, that’s brilliant! It looks so simple and obvious once you know what to do :smiley:

You say that SongKong doesn’t use SubTitle. You’re probably right - I must have added the field manually at some point in the past but not many of my albums use it. I find it handy though to distinguish between the various versions of some of my albums.

In the absence of SubTitle, is there an alternative field that SongKong uses that could serve the same purpose?

Many thanks.

Martin

SongKong understands subtitle it just doesnt automatically populate it so I think its make sense for you to use it.

In the Format tab you can adjust the Album field so it additionally contains items such as Audio Format/Album Type and if if HighDef, and you could also make use of these fields (e.g mbreleasetype) to amend your filename.

OK, so in that case, using SubTitle is probably a good way for me to go.

Thanks again for your help Paul.

Cheers.

Martin