Bug: Music Library: separate album when adding additional files

Server Version#: 1.27.1.5916 (but appeared already before the last update)
Player Version#: 1.47.1.3086-6c3d964f (Mac), latest iOS, latest PlexAmp iOS

I have found a very strange issue:
When adding FLAC files to the Music Library (no special settings, just Plex Agent etc) that have the same tags, they are not grouped by album.

Here is how to produce and the workaround:

To produce:

  • add only several FLAC files from an album to the album folder
  • scan Music Library files in Mac/Web app
  • now add more of the same album, again FLAC format, to the exact same album folder
  • scan Music Library files in Mac/Web app

Here is where I end up with multiple albums for the same artist.

Workaround:

  • move all FLAC files out of the album at the same time
  • scan Music Library files in Mac/Web app
  • now move all FLAC files back at once to the album folder
  • scan Music Library files in Mac/Web app

Now everything works as expected… all files are grouped under the same album, no special Metadata corrections applied.

Any one else had this problem / know what to do?

I’ve never seen this before with m4a/aac files.

Thank you

Update:
I checked the logs while importing the parts and every time new parts are added / music lib scanned, it will say:
Jun 28, 2022 07:04:43.099 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 0).
Jun 28, 2022 07:04:43.099 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 0).
Jun 28, 2022 07:04:43.100 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 0).
Jun 28, 2022 07:04:43.100 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 0).
Jun 28, 2022 07:04:43.100 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.101 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.101 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.102 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.102 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.103 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.103 [0x7f253e490b38] DEBUG - [Album] Creating album ‘(album name)’ for artist ‘(artist)’
Jun 28, 2022 07:04:43.105 [0x7f253e490b38] DEBUG - [Album] Added new metadata item ((album name)) with ID 12724
— little further:
Jun 28, 2022 07:04:43.289 [0x7f253e490b38] DEBUG - Found existing artist by name 5485
Jun 28, 2022 07:04:43.290 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 0).
Jun 28, 2022 07:04:43.290 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 0).
Jun 28, 2022 07:04:43.291 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 0).
Jun 28, 2022 07:04:43.291 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 0).
Jun 28, 2022 07:04:43.292 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.292 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.293 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.293 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.294 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.294 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.295 [0x7f253e490b38] DEBUG - [Album] Considering match of album ‘(album name)’ (matched: 1).
Jun 28, 2022 07:04:43.295 [0x7f253e490b38] DEBUG - [Album] Creating album ‘(album name)’ for artist ‘(artist)’
Jun 28, 2022 07:04:43.299 [0x7f253e490b38] DEBUG - [Album] Added new metadata item ((album name)) with ID 12726

Couldn’t recreate this problem on a QNAP based PMS.
I added half a Billie Eilish album in FLAC, scanned, and played it.
Then I added the other half to the same folder, scanned,
and the tracks appeared in the one album, no dupes.

I’m using well tagged flacs, and disabled Prefer Local Metadata. I name my files exactly as the Plex Article says to do.

Could someone else please check this on their setup (i’ve posted the relevant logs as well).

Thank you

I’ll try again to tomorrow with a few different sources.
Would you clarify which Plex you used to do the scans?

I ask because there’s a Plex for Mac standalone application.
But there’s also the Plex Web App that will load into any browser on any platform.
Your Player Version list included iOS. I guess that’s just to see the double albums.

If you used the Plex Web App, what browser did you launch, Safari?

Thanks nibbles,

I tried it all, Plexamp, web in safari/firefox & mac app, ios app

Seems to be a server/import issue

Maybe you could set aside an album to test with, and run those tracks through Musicbrains letting their analsys retag everything. See if that album exhibits the same issue.

did it fail to fill that field with the name of your music album, or did you redact that?
If it failed to fill a simple thing like album name, it sounds like a Tag problem that musicbrainz would help find.

I redacted the album name as well as artist.

Unfortunately these are livesets and don’t exist anywhere currently.

I used a tag editor to tag all of them the same except for the Name.

Like I said, if I add them all at once, all goes well, but when I add new files
it just adds the exact same album name again (diff id) as for some reason
it can’t match it.

Great. I’ll run my test again with a recording I made as FLACs.

I worked on this today with a half dozen albums.
I wasn’t able to replicate the issue using FLACs.

Would you convert 3 tracks of yours to wave,
trim them to 10sec each, recompress them to flac,
tag them identical to the complete tracks, test that they
still exhibit the issue, zip and upload them?

I experimented with two music libraries, one using Plex Music agent
and the other library of live material using Prefer Local Metadata.

Thank you so much for your help!

Unfortunately I cannot upload the content (copyright etc),
however I will try your metadata experiment on other albums that are not FLAC right now and see how they respond.

oops I interpreted this differently and figured they were your own recordings.

If you get the urge, you can make 3 recording of the birds out your window.
Same thing, flac them up, tag them, verify they exhibit the issue, zip and upload.

I don’t think we clarified if you were dropping the tracks into a normal music library with “Plex Music” as both the agent and the scanner, and whether you had Prefer Local Metadata enabled.

Unfortunately this issue has now spread across audio files :frowning:
even uploading an m4a file for an album after adding any 1 or more other files of the album
it creates a new album.

And once again, moving all the files away and then back as 1 big album, it is magically resolved.

I’ve done all the tagging and have set Prefer Local Metadata

I’ve updated the title as I have this bug all the time now.

I restarted the server, clients and everything, but as soon as a new track is added with the exact same metadata (album) then a new album is created for the same artist with the same name.

Upon further investigation, I downloaded the Database from Plex troubleshooting
and found out in metadata_items table, the Title & Title Sort is exactly the same, only diff is the Hash, which happens because as previously shown in the logs, there is no album match.

I did find some data in the extra column, making me thing that the Lyrics feature of the Music Library was the problem, after disabling this, moving the entire album away & rescan lib + then restart server en clients etc… adding the first track went fine, but then the next track, same issue: new album with, same name & artist, different hash, extra column was empty this time.

I’ve also done a OPTIMIZE DATABASE step, CLEAN BUNDLES step, nothing seems to work…

Please help, this is super annoying :frowning:

Here is the Music Library Advanced settings:

image

image

image

upload samples and specify all your hardware.
show us your file structure, how examples files would be named.
Tell us if you regularly Plex Dance when testing.
Tell us if you’ve followed any Plex articles for database repair / cleaning.
Set up a test PMS server and try from scratch with a couple of albums to reproduce this.

Want to jump in and say I’ve seen this happen as well. It’s pretty easy to replicate…

  1. add an album and let plex scan, match etc…
  2. ensure it displays correctly in the plex webui
  3. now rename a couple of tracks in the album, doesn’t need to be many, just a few
  4. scan the library

When the scan happens it seems to fail the match the renamed files and places them inside a new album entry, this then results in duplicate albums in the webui. I’ve Prefer Local Metadata enabled and my files are all tagged with musicbrainz picard.

Workaround I’ve been using is to empty trash, then fix match the resulting second album which will join them back again. 9/10 this works but sometimes I’ve been forced to plex dance the album.

Logs can be provided so I’ll let someone from plex ask before DMing them.

1 Like

You could be right. I should have said in my steps now rename a couple of tracks in the album including the title tags. This is actually how I came across double album scenario.

All my files are tagged with MusicBrainz Picard. I’ve noticed that from time to time that software will pickup a title change in a song. Maybe a typo change, upper to lower case or some other type of change. I have picard setup to rename files to match the title as per plex naming guidelines. Here is the script code …

$if2(%albumartist%,%artist%)/
$if(%albumartist%,%album%/,)
$if($gt(%totaldiscs%,1),%discnumber%,)
$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) ,)
$if(%artist%,)
- %title%

So when the title changes, the filename will change on disk. Then I run into this scenario.

Anyhow, if this is a constraint of the scanner and local metadata then I’m okay with that and its good knowledge to know and understand. I had assumed the scanner would be the same as the TV scanner, where is you rename a episode in a show the scanner would pickup the change without having to dance the show. I guess tracks (episodes) and albums (shows) are different in this comparision.

Going to play around with disabling local metadata and see if quirks like this don’t happen with it disabled.

I sure my tags are all good as pretty much everything matches upon a clean fresh scan but the performance of the scanner is not great when compared to the TV and Movie versions. Want to see if it’s any better disabled so it’s less work to do and can check this scenario while I’ll test that out.

Thanks for your thoughts and insights, appreciated.

1 Like

The livesets I gather are often not found online, couldn’t find them on Musicbrainz.

I spend quite some time today on a fresh local Plex server (latest version) on macOS
only to discover that the files were still split into separate albums no matter what I tried.

Spending time studying the other albums that were categorised correctly in 1 go while
I added track by track didn’t result in good luck either.

Then, ultimately I resorted to do the one thing I was sure wasn’t going to matter…
Adding fake track numbers to the livesets (no disk no’s) and then magically when adding more
files, it just worked… (this again I saw in the albums that were adding files instead of separate albums)

Unbelievable :sweat_smile:

Then I did the craziest thing that I was sure was going to fail…

I wiped the entire Music library on the mac test server again and started over.

However now, while adding single files to the album, I just changed 1 thing from the ‘Production’ server, every file that I added, I added a Track no tag… and sure enough, magically although a fake number, it just… worked… I still can’t believe it…!

I don’t have a Various Artists folder/Album Artist, I don’t follow the guidelines
but just adding the track number magically solves all my issues… I’m baffled!


Update: on another album that was successfully imported and sticks to 1 album as long
as the same artist matches, which already has all track no’s added from earlier tagging.
I was able to fix the new album creation on import of new files by setting the Album Artist tag
to the same artist for all tracks (Without setting the artist/folder to Various Artists).
Afterwards all tracks with a deviating artist would import to the same album due to the Album Artist.

Unfortunately disabling Prefer local metadata will not really be an option for me due to the album and artist sorting. I set the sort tags to be the same as artist and album artist and could not deal with the default sorting.

$set(artistsort,%artist%)
$set(albumartistsort,%albumartist%)

Also, scanner is about the same performance wise so will stick with Prefer local metadata and the quirks / limitations that come with it. Thanks again.