SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Running songkong cmdline in script in Docker environment

Well, regarding the fix task(s), you got the logs.

Now, regarding the ongoing rename task :

As stated in your tutorial : " Often the best choice is Yes if matched to a release this ensures that songs are only renamed if matched to a MusicBrainz or Discogs release, this in turn ensures that complete albums of songs are renamed and therefore kept together."

This is what I’ve picked, as it seems the safest option. This is what currently runs.

Okay that is the best option, but just to be clear if you have 5 songs in a folder matched to a 6 song release then they will all be renamed, so the songs are together but it is not a full album.

So I have extracted your support files but it only contains

DeleteDuplicates106
StatusReport103
StatusReport105

Do you know why that is ?

Do you have a recent FixSongsReport ?

Also it seems RenameSongs is still running ?

Anyway, regarding albums not being listed under letter this is because only your rename mask is set to use a letter, but your compilation rename mask is set to AlbumArtist - Album (Year)/Track - Artist - Title, this mask doesn’t group by letter nor does it put multidisc albums into separate folders for each disc.

ifnotempty(albumartist,' - ')
+ ifnotempty(album,' ')
+ '(' + (albumyear.length>4 ? albumyear.substring(0,4):albumyear) +')/'
+ ifnotempty(pad(trackno,2),' - ')
+ ifnotempty(artist,' - ')
+ title

So this explains why you are getting songs not within letter folder and not grouped into discs.

It would be so much easier to explain these problems if you could post screenshots from the songkong report itself rather than random music players. But looking at the Radiohead example it seems there is no problem, it looks like SongKong has identified the three separate releases correctly with Fix Songs but the rename mask you have chosen doesn’t include anything to distinguish these releases so Rename Files put them in same folder. You could either use the Add EP, Single, Compilation, Live and Remix release types to release title or Add Audio Format to release title options on Album Format tab to modify what SongKong stores as albumname so that when rename files the three albums will have different values for Album and thefore be stored in different folders

Although we don’t currently have option to add disambugation name to the album field, which might be useful to you https://jthink.atlassian.net/jira/software/c/projects/SONGKONG/issues/SONGKONG-1835

Or you could modify rename mask to use extra information to change the filename without changing the metadata, the albumversion field is useful this stores the album disambuguation if it has one in MusicBrainz.

With Aphex Twin example you just seem to be asking why its isnt displaying Promo at the end of the track title, but why would it the track title doesnt include Promo at end. Or are you just saying why isnt it displaying as two albums like it did for Radiohead ?

Well because I cannot see the metadata in the files (because report missing) and because I have never used navidrome I cannot give you an answer on that.

When I did some improvements for boxset there was a few bugs that allowed incorrect single song matching such as https://jthink.atlassian.net/browse/SONGKONG-2472 when they should not have. This was only released as part of SongKong 9.4 Raise so this issue may be a bug you encountered in matching algorithm when you ran against these songs that is now fixed.

So since you have gone down the renaming path I would do the folowing

  1. Fix Compilation Rename mask setting
  2. Modify both Compilation and Rename mask to include albumversion in mask -see Tutorial 41: Modifying Rename Masks
  3. Rerun Rename Files again, it will only have to rename a small amount of the files so this is the quickest approach.

This should resolve most issues.

1 Like

ideally, here is what I would like to achieve for this next run :

  1. add the EP, single, etc. seems to be as simple as a single click before running the rename task again. Great !
  2. Modify the mask(s), I’m afraid I’ll need a little bit of your help here, I understand I can clone an existing mask, and I’d like to do that, but could you eventually share the right masks I should use ?

Thanks again paul for your always great support.

And yes, I decided to let the current renaming go, and start a new one on the processed folder afterwards, this should only remane the albums/files for which a mask change is needed, right ? and keep the already renamed ones (matching the settings) in place, is this correct ?

Well, not quite because it is modifying metadata and hence is part of FixSongs task. So would have to run Fix Songs again to change the album metadata field. So I would suggest we leave that for when you next run Fix Songs and just make the changes to the masks for now and rerun Rename Files.

Okay I will do that now.

Correct.

But do you know why there is no FixSongsReport ?

Okay go to Preferences and then Filename masks tab

Select FirstLetterOfArtist/AlbumArtistorArtist/Album/AlbumArtistorArtist - Album - Track - Title from filename mask dropdopwn and selecte Clone,

Give it a new name e.g FirstLetterOfArtist with AlbumVersion

Modify Mask from

ifnotempty2(albumartist.substring(0,1),artist.substring(0,1),'/')
+ ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album,'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ title

to

ifnotempty2(albumartist.substring(0,1),artist.substring(0,1),'/')
+ ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album +  (albumversion.length > 0 ? ' (' + albumversion + ')'  : ''),'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ titleSelect *Save*

Then when run Rename Files task set Rename Mask and Compilation Mask to new name e.g FirstLetterOfArtist with AlbumVersion

Will now include album disambuguation in brackets after album folder

However, not many albums actually have this and it wont fix the multiple audio formats problem or single with same name as album problem. So we could also add in audiofornat and mbreleasetype bearing in mind if at a later stage you make the change to add them to the album metadata field, the information would be duplicated.

So we could change mask to

ifnotempty2(albumartist.substring(0,1),artist.substring(0,1),'/')
+ ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album + ' (' + audioformat + ',  ' + mbreleasetype +') '  
+ (albumversion.length > 0 ? ' (' + albumversion + ')'  : ''),
'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ title

This would give us

Obviously you can make adjustments to the mask for the exact formatting you would like.

thanks for this Paul.

Now, if it is really nice that I’ll have the different versions of the albums sorted in separate folder + their different “quality” versions as well. I should run this. But once I’ll start to remove the duplicates, I will get rid of the lower quality versions of same albums anyway. :wink: But totally worth it for now to at least have a clear, poper sort of all these “different / same” albums.

Now what is still unclear to me is how I am suppposed to do to pu all these folers that were put aside my “letter” folders in their own, dedicate “compilations” folder. AS far as I am reading the new mask you wrote, I cannot see this being part of it ?

Okay I didnt see that bit, will have to come back to that as out all afternoon.

here is my attempt :

if(contains(toLowerCase(releaseType), 'compilation'),
  if(toLowerCase(genre) == 'classical',
    'Classical_Compilations/',
    'Compilations/'
  ),
  ifnotempty2(albumartist.substring(0,1),artist.substring(0,1),'/')
)
+ ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album + ' (' + audioformat + ',  ' + mbreleasetype +') '  
+ (albumversion.length > 0 ? ' (' + albumversion + ')'  : ''),
'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ title

Here, I keep the artists “letters” and album versions etc.
I also added some lower and upped cap check, to make sure the mask isn’t only detecting “Compilation” but “compilation” as well.

Aside that, I check if the release is a compilation. If it’s a compilation AND genre is classical, then the whole folder gets moved to a folder called Classical_Compilations

If the release is a compilation, but NOT the genre is NOT classical, then the compilation goes to “Compilations”. This way, I’d like to move all these folders that polutes my “artists letters folders” to their own parent folder. And I also do separate “classical” compilations (which are often boxsets), of other compilations.

Could you confirm this is the right way to write / do it ?

Hi, you should use the iscompilation and isclassical fields these are better, in fact look at the Javascript functions that already exist addClassical() and addCompilation(). Also remember you set two rename masks, the rename mask and the compilation rename mask, the compilation rename mask is only applied to songs that have iscompilation==1 therefore if you use two different masks you dont have to code the iscompilation check into the mask anyway.

OK so in order to get non compilation Classical releases put in “Classical” folder :

if(isclassical == 1, 'Classical/')
else ifnotempty2(albumartist.substring(0,1),artist.substring(0,1),'/')
+ ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album + ' (' + audioformat + ',  ' + mbreleasetype +') '  
+ (albumversion.length > 0 ? ' (' + albumversion + ')'  : ''),
'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ title

This is to be used in the first mask (non compilation)

and the second one that wouuld be used as “compilations mask” could be:

if(isclassical == 1, 'Classical_Compilations/')
else 'Compilations/'
+ ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album + ' (' + audioformat + ',  ' + mbreleasetype +') '  
+ (albumversion.length > 0 ? ' (' + albumversion + ')'  : ''),
'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ title

This way, I guess that :

  1. non compilation releases that are genred “classical” will go in their own “Classical” folder instead of the general Letters folders. This way, I’ll keep classical music separated from rest of the collection (I think about doing this as I have several friends that are ONLY interested in classical music, I4d like to build a dedicated library for them).

  2. for compilations, I’ll have two folders been created. If the genre is classical, releases goes to “Classical_compilations” folder. if non classical, the release goes to “Compilation” folder.

Is this allright ?

Yes I think so, except in your mask your if else syntax is not quite right it should be

if(isclassical == '1') { 'Classical/' } else  {ifnotempty2(albumartist.substring(0,1),artist.substring(0,1),'/')}
ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album + ' (' + audioformat + ',  ' + mbreleasetype +') '  
+ (albumversion.length > 0 ? ' (' + albumversion + ')'  : ''),
'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ title

and if Classical you dont break down by first letter, is that what you want?

And second should be

if(isclassical == '1') { 'Classical Compilations/' } else  {'Compilations/'}
ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album + ' (' + audioformat + ',  ' + mbreleasetype +') '  
+ (albumversion.length > 0 ? ' (' + albumversion + ')'  : ''),
'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ title
1 Like

Well, idea to split artists by their letter is due to the amount of artists. There are way less composers, so I guess i can live without the letter folders.

Thanks for the double check paul! When the current rename task will be done i will adapt the masks and run the task one more time!

1 Like

I’ve noticed a huge slowdown again. This is areally really weird. First 300k files were moved in a couple of hours, while in then last 2 days, I had a process of approximately 50k files per 24 hours.

I did cancel the current rename task, wait for the report to be generated, and will send you the support files in order to see if we can detect why songkong performace gets impacted that way. I will then restart the same task on the remaining files (approx 100k files) and see if performance is allright again.

OK so I used the two above masks, ran a new rename task over the remaining 10k. and the "Classical Compilations/ and Compilations/ folders are not been created. look:

Actually, you can see even “regular” albums are not put in their artists letter folder anymore. they are placed aside my previously created letter folders, in an artist name folder. :frowning:

Also I can see it only renamed 3202 files in 49 minutes, which seems totally unrealistic to me. And yes, I’ve stopped and restarted songkong in between :frowning:

  • Report 141 started at Sep 12, 2023, 9:20:20 AM
  • 49 minutes 29 seconds
  • Report 141 finished at Sep 12, 2023, 10:09:50 AM

Ah, sorry missed a plus sign at start of second line, should be

if(isclassical == '1') { 'Classical/' } else  {ifnotempty2(albumartist.substring(0,1),artist.substring(0,1),'/')}
+ ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album + ' (' + audioformat + ',  ' + mbreleasetype +') '  
+ (albumversion.length > 0 ? ' (' + albumversion + ')'  : ''),
'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ title

and

if(isclassical == '1') { 'Classical Compilations/' } else  {'Compilations/'}
+ ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album + ' (' + audioformat + ',  ' + mbreleasetype +') '  
+ (albumversion.length > 0 ? ' (' + albumversion + ')'  : ''),
'/')
+ ifnotempty2(albumartist,artist,' - ')
+ ifnotempty(album,' - ')
+ ifmultidisc(ifnotempty(pad(discno,2),' - '))
+ ifnotempty(pad(trackno,2),' - ')
+ title

When doing things for first time I like to run for short time in preview mode first and check the results in the report before committing myself.

ok I do a total restart of my unraid server before running sonkong again, just to compare the process speed.

I’ll keep you posted ! :slight_smile:

THANKS !!!