SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Songkong putting mp3 files in existing flac folders

Hi there,

So I just started a new fix job on an old folder containing old mp3 files.

And here is what happens :

songkong do put the old mp3 files aside the previously renamed and moved flac files.

So to be sure the mp3 files would be deleted, I ran a duplicates job on the above folder. And started to check a folder content :

/Trimuph of a Heart/

You can see songkong did KEEP both mp3 and flac files, they are now in double in this folder :frowning:

Another folder did exist (Triumph of a heart (1)), here I can see songkong deleted the mp3 files from, but kept all the rest and did not delete the containing folder. also visible in above screenshot.

This makes me super scary about pressing the start button again. Can you please check why songkong is putting my mp3 files at the same level as the flac files ? any why the dupechecker is actually not deleting the lower quality files once this is happening ?

I upload the support files now.

thanks !

I paused the job, but do you have an idea of why this is happening ?

It did it for all my damn albums this is a total mess :frowning:

by the way, I also do see this java error when starting the job :

And as you can see, running the duplicates job again on the same folder, finds duplicates again (???).

So didn’t songkong get rid of all duplicates at first run ? It did detect and delete 5 files on the second run that were not processed at first sight.

and another weird thing :

it loads more files than announced, see above screenshot.

I’ve ran some tests of duplicates finder on an artist folder folders.


  • Find duplicates within same audio format only: No
  • Song is a duplicate if has same: Same MusicBrainz song and same album (specific version e.g. same country/date)
  • When you have duplicate songs: Delete duplicate

songkong did delete mp3 files located in other folders (as I expected), but it also did delete all the “same” files in other album versions. In short, I have albums that only contains a single track, as they were versions including extra tracks).

Received your reports and quick answer to your first questions

The simple answer is that you told it to, it is the right foldername based on your mask. Now okay the folder already existed and contained music files, but these music files are not part of the batch of files that SongKong was processing so SongKong just sees it as folder. If you had run Fix Songs over both folders at same time then it would attempt to group them into multiple folders because there would appear to be multiple copies of album with same name.

One solution maybe to modify your rename mask to add mp3 to the album name if the files are mp3s.

Because your mp3 files and flac files have been matched to different versions of the same album. Flac have been matched to 5 track version

and mp3s have been matched to 3 track version

I think this is actually correct because you have 5 flac files but only 3 mp3 files.

If you modified Delete Duplicates to use Same MusicBrainz song and same album (any version) i think it would work for you.

It will only delete the folder if the folder is now empty, which it is clearly not, it contains a number of different files and it would not be right for Delete Duplicates to assumes these files could just be deleted, we did discuss this before and I raised an issue to consider it further but nothing else has been done on it.

That should not occur, looks like a bug introduced with changes, guessing occurs when no duplicates found I dont think I tested that situation.

No, its not showing any duplicates found, 283 is just the number of songs loaded.

That seems like a bug as well.

Which report is that, do I have that report or did you do this after sending support files ?

Ok found error in log, and raised

Ok so I believe I have to do two things here.

  1. append (mp3) to the folder name as soon the tracks are in mp3 format. I will need you to help me with that as I’ve never really had any luck changing this in the advanced settings. Can you please give me some directions ?

  2. make use of “any version” and run the dupchecker again. But what then ? As far as I tested, if I’m running this, I do end up with folders that contains the actual album tracks, and other ones tat only do contain the extra tracks. here is some screenshot to illustrate this :

one extra track all alone from a different “version” of the album :

all tracks of the “actual” standard version of that album:

here it gets even worse at it seems songkong deleted flac files to keep mp3 files instead. the CD and Vinyl versions of this album are quite different as you can see :

here is what happened to my tracks :

Could I eventually roll back to the state I was before I started last fix job ? then add the (mp3) rule to the folder name, and start again ? What do you think is best practice ?
Because as you can guess it, and looking at the track numbers, the flac version had 19 tracks, and now only has 17 left.
How can I make sure that songkong will keep both versions of an album if it encounter such differences between versions ?

This is avery specific case as this album contains the following changes according to discogs :

" Different tracklisting to the “Dropsonde” vinyl edition, released a few months earlier, this CD adds six tracks (tracks 1, 3 to 6 and 11) but excludes the track “In The Shape Of A Flute”."

Having such different track lists is extreme and not common I guess.

Thanks again paul !

Its not a Delete Duplicates setting, its part of Fix Songs so I would suggest you revert changes, assuming the original folder only contains mp3s you want reverting not flac files as well.

  • Select that folder
  • Select Undo Changes
  • Change Find Songs to *that were originally in the selected locations
  • image

That should work, but note it doesn’t revert the last task its reverts any changes made to those files since added to database, i.e. since first loaded into SongKong unless the database has been recreated (which it is automatically when you upgrade SongKong to later version) in which the last database creation.

Then you need to edit the rename mask you are using ( [ Plex Music Scanner ] AlbumArtist/Album/Track - Title) in Preferences as follows:

Change from

+ ifnotempty(album,'/')
+ ifnotempty(pad(trackno,2),' - ')
+ title


function displayMp3IfMp3(audioformat)
        return ' (Mp3)'
     return ''

+ ifnotempty(album, displayMp3IfMp3(audioformat) + '/')
+ ifnotempty(pad(trackno,2),' - ')
+ title

Basically, we add an inline javascript function to add ’ (Mp3’) after album if the file is an mp3.

You must remember that although with the option you have selected we are considering duplicates in an album centric way we are still always comparing individual song files not albums. I’m guessing what happened here is that it found duplicates for tracks 1-8 and since both folders contain mp3s kept the ones with Earliest File Creation Date, (or they may have higher bit rate because that is 3rd in your list of Preferred Deletion Criteria) and I expect that is the ones in Man With a Movie Camera folder, so they all get deleted from Man With a Movie Camera (1) except the one that is not a duplicate, would have to see report to be totally sure.

Now in your previous example for Bjork your problem was that it hadn’t deleted the duplicate album even though it was different version, in this case you do want to delete the different version but you want it to delete the shorter version. Maybe we need an additional advanced criteria to allow to keep the track with the highest value for track total (the longest album).

But then what should it do if you have two versions of the album with same number of tracks, but with same tracks 1-9, but with different bonus track 10 ?

Or you had a short version in flac format, and a longer album in mp3 format. With current situation it would keep the flac files, and then would have partial album for the mp3 files that were not duplicates, but that is what I would want, and then I could manually move into single folder. You can also already restrict to only find duplicates within an audio format, if this was enabled then no duplicate would be found.

BTW Same album (any version) is English for the MusicBrainz Release Group concept, a Release Group can contain different versions (Releases)


Okay I have got slightly confused here you have two different Biosphere examples, there seems to e only one version of the Man With a Movie Camera album so my guess of what happened may not be exactly right, this is the peril of trying to work out what happened based on user screenshots rather than having the report to hand.

Is this in preference > filename mask ? Or somewhere else ? I cannot figure out how to edit the rename mask from the webUI.

Here is what I can see in there

Regarding the rollback -> I did update to 8.5, then did run the fix job of /music/music/ content. So I guess I can select /music/music, entirely, and select “that were originally in the selected locations” ? Will it work recursively ?

and when you say " BTW Same album (any version) is English for the MusicBrainz Release Group concept, a Release Group can contain different versions (Releases)" ->

I short, once I’ve rolled back to initial status, changed the setting to get (mp3) and keep mp3 separated of flac, what’s best option to choose for next run ? any version ? or specific version ?

I can send the report again, the support files I’ve sent were indeed sent BEFORE I tried to remove these duplicates.

You’ll get it in a while. uploading them now :wink:

That is right but you haven’t selected the right filename mask, then just replace the value in the Mask box.

Yes and yes.

Well that up to you, you need decide exactly what you want it to do. But I would run specific version first as that will do less, then consider if you need to rerun any version. Also may be better to set When you have duplicate songs to Moveto Duplicate Folder rather than Delete Duplicates .You can also run in preview and make use of the report to see if it has done what you want.

Ok so here is what my plexmediascanner looks like now, can you confirm this is OK ?

function displayMp3IfMp3(audioformat)
return ’ (Mp3)’
return ‘’

function addClassical()
return isclassical ==‘1’ ? ‘Classical/’ : ‘’;


  • ifnotempty(album, displayMp3IfMp3(audioformat) + ‘/’)
  • ifnotempty(pad(trackno,2),’ - ')
  • title

I also ran a rollback based on your input (/music/music selected), but it is unfortunately not working

I upload the support files one more time so you’ll be able to check the logs.

I will keep using specific version once I’ve succeeded in the rollback of the changes.

Edit : support files are now uploaded, and you can see in report 13 that these files were processed and that the revert should be working, right ? :slight_smile:

Wheres this bit come from, it wasn’t in there before?

hm, it’s the one that should put the classical genres releases into a subfolder /music_processed/Classical/

as now I finally did understand where I had to make that change I wanted to achieve the mp3 thing + the classical folder thing :wink:

So you just added that in at the same time as the Mp3 change?

You are not actually calling that function so it will not do anything AND that function already exists as a standalone function so you didnt need to add that function just call the function.