SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Folder renaming question-adding codec

Dear songkong enthusiasts :slight_smile:

I have a question about the folder renaming mask. Currently, I am using a preset mask “artist/album-(year)/audio file”. In some of the same artists I have both flac and mp3 versions of same album.

What I want to do is under the artist main folder I would like to seperate these albums by adding “Mp3 or flac” label to album title (not to add id3 tag after the release date. Does anyone use this kind of mask for folder renaming or help me to create this kind of mask. The better case would be the addition of bit rate of flac file :slight_smile:

Thanks in advance

Hi, can you give me a couple of examples of what you like to make it a bit clearer please.

Dear Paul thank you for a fast response.

My example case like after fixing songs

For lossy case: …/Anathema/judgement (1999) - [MP3]

Actually if I label only the lossy albums I can seperate them easily and that might be enough. But if it is possible for the lossless albums below scheme would be perfect:

…/Anathema/judgement (1999) - [16-44]

So there will be two album folders in the same artist folder as below:
…/Anathema/judgement (1999) - [16-44]/01 - deep.flac
…/Anathema/judgement (1999) - [MP3]/01 - deep.mp3

I have pro license it can seperate 24 bits from cd rips by adding [hd] label but I would like to use similar scheme to seperate lossy albums.

Hi, okay try this

  ifnotempty(albumartist,'/')
+ ifnotempty(album,' ')
+ '('+(albumyear.length>4 ? albumyear.substring(0,4) : albumyear)+') -'
+ (audioformat =='Flac' ? '['+audiobitrate+']' : '['+audioformat.toUpperCase()+']')
+ '/'
+ ifnotempty(pad(trackno,2),' - ')
+ title

Dear Paul, I have tried that mask but I had some problems

After renaming folder structure was;

image

For Flacs due to the ripping and variable bitrates I guess for each song having different bitrate it creates a folder. İf it is not possible to write as [16-44] or something else, writing just [Flac] would be enough.

Another thing in the mask I am worried about is the multidisc albums. In the masking code I did not see anything related with the multi disc releases. Currently I am mostly using image preset. it works like charm. Is it possible to implement your MP3-FLAC codec labeling to this preset ?

Additionally For future modifications If I jut add [MP3] label to the album name without changing Flac album names how can I modify your code ?

I am new to this kind of conditionals, thank you for your helps.
Thanks.

I think you need audiosamplerate instead of audiobitrate
e.g

ifnotempty(albumartist,'/')
+ ifnotempty(album,' ')
+ '('+(albumyear.length>4 ? albumyear.substring(0,4) : albumyear)+') -'
+ (audioformat =='Flac' ? '['+audiosamplerate+']' : '['+audioformat.toUpperCase()+']')
+ '/'
+ ifnotempty(pad(trackno,2),' - ')
+ title

I just gave you a mask for what you requested you could add an extra folder if album is multi disc as follows:

ifnotempty(albumartist,'/')
+ ifnotempty(album,' ')
+ ifmultidisc('Disc ' + ifnotempty(pad(discno,2),'/'))
+ '('+(albumyear.length>4 ? albumyear.substring(0,4) : albumyear)+') -'
+ (audioformat =='Flac' ? '['+audiosamplerate+']' : '['+audioformat.toUpperCase()+']')
+ '/'
+ ifnotempty(pad(trackno,2),' - ')
+ title

Sorry I dont understand your question.

Dear Paul thank you for your response. I have tried audiosamplerate but in flac file it ended up with

Ahkmed\Distance (2009) -[44100]

I tried something else, still not what I want but my code is;

        ifnotempty(albumartist,'/')
        + ifnotempty(album,' ')
        + '('+(albumyear.length>4 ? albumyear.substring(0,4) : albumyear)+') -'
        + (audioformat =='Flac' ? '['+audiobitspersample+'-'+audiosamplerate+']' : '['+audioformat.toUpperCase()+']')
        + '/'
        + ifnotempty(pad(trackno,2),' - ')
        + title 

Then it ended up with;

Ahkmed\Distance (2011) -[16-44100]

What I want to do is now shorten the 44100 as 44

For my previous question;

Sorry maybe I was not clear. My question was the modification of image preset in the software just by an addition of MP3 codec labeling. Such that

if audioformat is Flac do/add/write nothing, but if audioformat is MP3 then add audioformat e.g. [MP3] to the album name after album year:

Ahkmed\Distance (2009) [MP3]

Okay so it is output in Hz, you want it in Khz so you can simply use

audiosamplerate / 1000

to output 44.1

or if you want to round it to 44 do

Math.round(audiosamplerate / 1000)

for example

ifnotempty(albumartist,'/')
+ ifnotempty(album,' ')
+ ifmultidisc('Disc ' + ifnotempty(pad(discno,2),'/'))
+ '('+(albumyear.length>4 ? albumyear.substring(0,4) : albumyear)+') -'
+ (audioformat =='Flac' ? '['+Math.round(audiosamplerate / 1000)+']' : '['+audioformat.toUpperCase()+']')
+ '/'
+ ifnotempty(pad(trackno,2),' - ')
+ title

If instead you only want to display format if it is an Mp3 file

 ifnotempty(albumartist,'/')
    + ifnotempty(album,' ')
    + ifmultidisc('Disc ' + ifnotempty(pad(discno,2),'/'))
    + '('+(albumyear.length>4 ? albumyear.substring(0,4) : albumyear)+') '
    + (audioformat =='Mp3' ? '[MP3]' : '')
    + '/'
    + ifnotempty(pad(trackno,2),' - ')
    + title