SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Adapt this mask :)

Hi @paultaylor, thanks for the fixes in latest version ! I’m ipatient to see how much discogs releases will be renamed at next round :wink:

I have one extra request for you, I ended up with a lot of lower case folders aside uppercase ones. And I started thinking about a way to sort the artists in their respective folders a little better.

here is the mask I ended up with, but songkong keeps telling me “invalid mask”

(isclassical == '1' ? 'Classical/' :
  (isSpecialChar(albumartist.substring(0,1)) || isSpecialChar(artist.substring(0,1)) ? 'Special chars/' :
  (isForeign(albumartist.substring(0,1)) || isForeign(artist.substring(0,1)) ? 'Foreign/' : 
  ifnotempty2(albumartist.substring(0,1).toUpperCase(), artist.substring(0,1).toUpperCase(), '/') )))
+ 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

Do you spot the issue ?

Idea is to have lower case artists in the upper case letter folder
foreign artists (non latin), in the “Foreigner” folder
and artists who starts with a special char (?,*,!,), …) go to “Special chars”

I can’t see the problem, but the error may be in your custom javascript functions so can you post them as well please.

If its not that its probably an issue with brackets but mot at office so I can’t test it.

If I replace isSpecialChar and isForeign with another function (ifmultidisc) it works so there must be a problem with these functions

(isclassical == '1' ? 'Classical/' :
  (ifmultidisc(albumartist.substring(0,1)) || ifmultidisc(artist.substring(0,1)) ? 'Special chars/' :
  (ifmultidisc(albumartist.substring(0,1)) || ifmultidisc(artist.substring(0,1)) ? 'Foreign/' : 
  ifnotempty2(albumartist.substring(0,1).toUpperCase(), artist.substring(0,1).toUpperCase(), '/') )))
+ 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

Also, I notice you have

+ ifnotempty(album + ' (' + audioformat + ',  ' + mbreleasetype +') ' 

but I think somewhere else you told me that in Fix Songs you had Add Ep… and Add Audio Format… options enabled

If this is so this will mean that the album variable will already contain release type and audio format so your filename will end up with the information twice.

with these adapted two functions, no more error :

function isSpecialChar(char) {

    var specialChars = ['!', '?', '_', '@', '&', '#', '$', '%', '^', '*', '(', ')', '-', '+', '=', '<', '>', '/', '\\', '|', '{', '}', '[', ']', ':', ';', ',', '.', '~', '`'];


    return specialChars.indexOf(char) !== -1;
}
function isForeign(char) {

    return !/[A-Za-z0-9]/.test(char);
}

This should avoid de hundred of Japanese, russian, and other special chars directories creation :wink:

Hi Paul, quick question regarding this. I4ve noticed that the duplicates finder sometimes finds a very (strangely) low amount fo duplicates when processing some of my “montly” folders.

So I have to ask, could it be because I started to tag the album with their audio format inside the album title ? Therefore I’m ending up with an album called something (Flac) and another one Something (mp3), meaning songkong will not identify these as duplicates ? OR is songkong relying on the musicbrainz group in priority ?

It depends on your options, but if you are using same MusicBrainz song and same album options then it is using MusicBrainz Ids not album title so not a problem.

I suspect the issue is more likely to be because not many songs were matched to MusicBrainz in first place, especially if many eps single rather than albums. You should probably additionally run with the Same Discogs songs and same album and sounds the same option

ok, quick question then, I need to run this in two separate runs ? This makes me think it is then mandatory to get able to add parameters to the songkong cli.

I just checked and indeed, after a duplicates job task, I still do have a lot of duplicates in my artist folders :

Agreed, already raised an issue to allow you to provide a profile - https://jthink.atlassian.net/jira/software/c/projects/SONGKONG/issues/SONGKONG-2498 and this would be the way to do it. (I wont be adding support for adding every parameter directly to the cli as would be alot of work and result in a very complex cli)

In the meantime there is a way round this for you. Simply create a profile for each delete duplicates task you want to run in your script. Then after running the first one rename current profile and rename the profile file you want to use so it has the same filename and then run again, then rename back.

For me to tell you why this is I would need a FixSongsReport or StatusReport so I can see the metadata contents of the file and the DeleteDuplicatesReport that was run. But I can have a guess, either you are using an option that includes Sounds the same and this means the songs must have same acoustid. If the songs are not (near enough) identical because too many differences in encoded output then may have different values, another reason is maybe not matched to Discogs either, or each matched to a different version of the Discogs release.

9 posts were split to a new topic: Why has SongKong split album and why am I still gettting duplicates

2 posts were merged into an existing topic: Why has SongKong split album and why am I still gettting duplicates

A post was merged into an existing topic: Why has SongKong split album and why am I still gettting duplicates