Music Library Doesn't Get Artist or Album Artwork

Life’s great, @ChuckPa! I hope all is going well for you on the East Coast with you and your [growing] NAS collection. Glad to hear you’ve grown your collection immensely.

While not my primary job, I’m a partner in a high-fidelity home installation service in the Pacific Northwest. Our installs go from crazy expensive to moderately inexpensive. And we make recommendations for lots of folks even if they don’t employ us. We often install super high end streamers (Naim, NAD, Sony ES, Cambridge Audio) and frequently recommend Sonos and Plex for their comparative ease and low cost.

For music players, there is a pervasive industry standard that accepts disorganized media (MP3, M4A, FLAC files with embedded metadata) and indexes, aggregates and groups the songs by useful dimensions (artist, song title, album, album art, genre, etc.) irrespective of the folder structure in which these files reside.

Whether you

  • Drop all 1000+ of Frank Zappa’s songs into 109 different folders by album or
  • Drop all 1000+ songs into a single directory called “Frank Zappa” or
  • Drop all songs into a single directory called “Random Music” (along with other artists like Led Zeppelin and the Thompson Twins)
  • Drop 4000 songs from the 80’s into a single folder called “80s Music”, 1000 songs from the 90’s into folder called “90s Music”, etc.

…nearly all media servers, streamers, home and car media players will index all of the music by its metadata - and automatically group the albums, artists, song titles, genres by these dimensions. The folder structure is irrelevant. You could even change a music filename to RandomSong.FLAC and as long as the metadata is correct, the media device will use the MP3/M4A, FLAC metadata to correctly identify RandomSong.FLAC as Frank Zappa’s ‘Don’t Eat The Yellow Snow’ from the 1974 album Apostrophe (’) in the Rock genre.

This holds true for any OEM (Honda, BMW, Telsa), aftermarket (Sony, Alpine) automobile head unit, home streaming device (NAD, etc.) or media server (Stremio, Kodi, Mezzmo, Emby), Windows application (MediaMonkey, iTunes, Windows Media Player) or android app (MMA, VLC, RocketPlayer, etc.) - except Plex.

Sure, some media players require a few seconds/minutes to index the media by the metadata. But once indexing is complete, folder structure is irrelevant to browse dimensions and play media.

Unlike most industry media devices and apps, Plex now requires a specific folder structure to aggregate, collate and group media. As organized as your collection is above, earlier versions of PMS didn’t require this to work correctly.

To confirm, we found an old Plex server in the shop running 1.15.x Synology PMS working just like most industry players (i.e., folder structure is irrelevant). Servers built years ago and running up-to-date 1.18.x PMS have a growing list of ‘Various Artists’ where the lack of folder structure is causing new tracks to fail indexing and drop into the ‘Various’ bucket. Somewhere between 1.15 and 1.18, the Plex music world changed to deviate from the industry norm.

So we’ll be hard-pressed to recommend Plex since we now have to ask interested customers, “Are all of your music files in structured folders by Artist and Album name?” and if so, "Will you always maintain this structure for all new music no matter where you get it from (a friend, a ‘mix-tape’ USB stick, etc.). If they answer no to either, we’ll have to recommend something else.

Glad to find a workaround either via Library or Agent settings. But from the helpful answers above, it sounds a lot like a specific user scenario wasn’t explicitly designed for, so no one noticed that it ‘broke’ Plex from the industry norm with newer PMS releases.

Would be glad to hear back on options. All the best, @ChuckPa!

Hi - I’m dealing with a related but also odd twist on this topic. After the 2/20 (or 2/19) update, none of the album artwork was displaying in my Plex account. Long story short, I rebuilt my library, which was borked by the iTunes plugin bug. I ended up—after a frustrating couple of hours—finally being able to rebuild my library again, but none of the album artwork loaded. After upgrading to the most recent version, though, I can run a refresh metadata on some of my albums where the artwork will display. However, there are a number of albums where when running “refresh meta data,” there is no refresh action run (no spinner on the cover), and it appears to just sit there and do nothing. And while no artwork displays, all of the other meta data is correct, and the tracks do play.

All of my music is organized by iTunes native folder structure, and I’ve never had a problem with album artwork not displaying (and if it did not, a simple refresh always fixed it).

Should I try rebuilding the library again from scratch? Any other thoughts? Thanks…

Longtime Plex and linux user here, on PMS 1.18.7.2457

I am also having the issue where Plex inexplicably bundles all my albums under a few (incorrect) artists and fails to download cover art.

  • I am using the Plex Music agent and scanner.
  • I have organized my media in the suggested music/artist/album/track(s) folder structure.
  • I have meticulously curated my tags with beets and/or lidarr (including matching the albumArtist tags)
  • I have done the Plex dance and rebuilt my music library more than once (although this causes the albums to be matched under a few different artists each time).

Yet, I cannot get my music library to act in a sane fashion. I tried toggling the option to “Prefer local metadata” between library rebuilds, and neither seems to work. Previously, when Premium Music Libraries were a thing, and even up until a couple weeks ago, my library acted as it should. I am a Plex Pass Lifetime member and have never had such troubles with my music library.

If my issue is any indication, do NOT rebuild your library. If you must, create a new library with the desired settings as a test. If that works to your satisfaction, then you can delete your old library and rename the new one the way you want.

When I rebuilt my library, I lost everything - and there was no way back. See if you can avoid my mistake. Cheers!

I have experienced the same thing with albums not aligning correctly (tracks from “volume 1” ending up in “volume 2,” for instance)—despite meticulously tagging them as such. I don’t know another way to put it but Plex is not always the smartest piece of software. Beyond ‘hacking’ the meta data to group like albums together, I haven’t figured out anything to fix it…

Wish I’d followed this advice last night…sigh. And also, making a new library failed to solve the artwork meta data issue…sigh…

I have noticed a consistent error when I try to match albums manually. Note that my organization heirarchy matches documentation for music with embedded metadata

and the files do indeed contain matching metadata (including the AlbumArtist field)

I am manually matching this Nine Inch Nails album that is incorrectly grouped under Primus.

I replace the filled in “Primus” in the Artist field with “Nine Inch Nails”

And no matches are found. Logs include the following error (trimmed for brevity)

Feb 26, 2020 10:17:56.309 [0x7ff3ff7fe700] Debug — Request: [127.0.0.1:46230 (Loopback)] GET /identity (10 live) Signed-in
Feb 26, 2020 10:17:56.309 [0x7ff47d5ee700] Debug — Completed: [127.0.0.1:46230] 200 GET /identity (10 live) 0ms 398 bytes (pipelined: 1)
Feb 26, 2020 10:17:59.112 [0x7ff47e640700] Debug — Jobs: '/usr/lib/plexmediaserver/Plex Media Scanner' exit code for process 7310 is 0 (success)
Feb 26, 2020 10:17:59.113 [0x7ff46ede2700] Debug — Music Scanner: Matched 17 files in 30.4 sec (/media/music/Nine Inch Nails/Hesitation Marks)
Feb 26, 2020 10:17:59.359 [0x7ff46ede2700] Error — downloadContainer: expected MediaContainer element, found Error
Feb 26, 2020 10:17:59.360 [0x7ff47d5ee700] Debug — Completed: [172.19.13.2:32820] 200 GET /library/metadata/340920/matches?manual=1&parentTitle=Nine%20inch%20nails&agent=tv.plex.agents.music&title=Hesitation%20Marks&language=en&year=2013 (9 live) TLS GZIP 30613ms 561 bytes (pipelined: 7)
Feb 26, 2020 10:18:01.644 [0x7ff3ff7fe700] Debug — Request: [127.0.0.1:46236 (Loopback)] GET /identity (10 live) Signed-in
Feb 26, 2020 10:18:01.644 [0x7ff47cded700] Debug — Completed: [127.0.0.1:46236] 200 GET /identity (10 live) 0ms 398 bytes (pipelined: 1)
Feb 26, 2020 10:18:03.846 [0x7ff47cded700] Debug — Completed: [172.19.13.2:57288] 200 GET /player/proxy/poll

This error log entry occurs every time I attempt to match an incorrectly identified album

This seems to still be an issue even with correct folder structure and embedded tags. Please see my last topic reply.

From the linked support article, it seems former Plex functionality is now broken (a bug) or unceremoniously deprecated without head’s up to users.

@tankertux’s experience shows that even the fallback behavior of requiring the correct folder structure may also be broken.

Would you be able to post screenshots of your Music Library settings? If folder structure isn’t working, it’s possible you’ve got a stray setting…

Sure thing! I think I got all relevant settings including the agent settings.

Has there been any update on this? Despite rebuilding, resyncing, refreshing, reloading, I’m still getting spotty metadata pulls. Music still plays (thankfully) but definitely making for a lackluster expereince…

No update. I installed the latest version of Windows PMS and experienced the same behavior of failed metadata indexing.

It’s unfortunate that this thread hasn’t gotten an update.

Plex was my go-to solution for streaming music. But with the recent change (bug, design change - not sure which), it seems Plex no longer uses metadata as the only or even the primary method to index music files like competing solutions.

I’m hopeful we’ll get a reply. But I’m not optimistic seeing that the Windows PMS has the same behavior.

I’ve found most/all players and media servers work best with folder organization. And Picard/beets will do this work for you, as will iTunes (at least last time I used it) as mentioned earlier.

I left local metadata off, and that’s when Plex finally cleaned everything up perfectly :slight_smile: Note, all my music has a corresponding musicbrainz release, so it will match 100% of the items I have locally to a MBID.

Yes, I tried both ways, toggled on AND toggled off. My music library used to be handled perfect as a Plex Premium Music library and seems to have been corrupted by a relatively recent release. Would you be willing to delete your library and rebuild it on the most recent release? If not, would you still reply with the PMS version you are running and on what OS?

It might help to point out if there is something corrupted in my Plex server’s metadata DB .

1.18.8.2468 and Docker (linuxserver.io image)

There’s no need to delete a library, you can just create a separate music library.

That being said, I’m not having any issues with new music in my library, so I can’t imagine it’s a bug in the server. Also I created a new music library and it worked fine as well.

I would suggest re-installing PMS from a fresh download, to make sure something didn’t go wrong during install. You can also try repairing the database, taking care to read the full article.

@Daimyo - I understand you’re trying to help, but in case it was missed from the earlier posts:

  1. For 6 years, Plex didn’t require a folder structure to organize and index music. This is well documented here - and proven over the last 6+ years of Plex use until the 18.x series of Synology updates (but affects the most recent Windows PMS too).
  2. Most music players, servers and streamers DO fully index via music file metadata. File structure is irrelevant. To say otherwise, is simply not true. Plex matched this industry standard. Then in recent releases, Plex broke.
  3. Regardless of Music Library setting (whether to prefer local metadata or not), the Plex indexing system via music file metadata broke. And it was difficult to see at first since it only affected new songs added to the library with the 18.x (and most recent Windows PMS) releases. Or it was easy to see if you made the mistake of rebuilding your library at which point all thousands of your music files would aggregate under a single garbled Plex entry.

I sell streaming media devices, recommend and configure media servers and media players. Tossing 1000 songs with quality metadata into a single flat folder called “Cool Music” (no folder organization at all) works in every aftermarket and OEM head unit in any automobile, every streaming server (Kodi and others), almost all Windows and Android apps (MediaMonkey, RocketPlayer, Google Play) and hardware streaming device (Cambridge Audio, etc.). The industry supports full indexing of music without the need for a folder structure.

Plex matched this industry standard until the latest major release (both Windows and Synology PMS). Rolling back two major versions on Synology and Windows PMS fully resolves the problem.

Something serious broke with the most recent major PMS releases.

This is no longer a troubleshooting, setting or library rebuild issue.

It would be great to get a clear answer on whether this is a bug or whether Plex now requires folder structures that no other player on the market requires - and if so, revise their longstanding documentation that music file metadata is no longer enough for Plex to correctly index music files.

I hope that helps. Cheers.

I’m glad the Music libraries are working for you, but there clearly is a bug in the server/database, and as a developer myself, I can imagine a bug that affects some users and not others. I am also using a Docker container, specifically the plexinc/pms-docker:plexpass.

I’ve even done my due diligence with your suggestion. I created a new Music library and it scanned in with all the same errors I’ve described above.

Then, I deleted all my music libraries, optimized the DB, deleted bundles, and then finally I ran a DB repair after verifying no obvious corruption (dumping the sqlite DB to text and then rebuilding it from the dump, deleting the shm and wal files, all while the docker container was stopped)

[tankertux@tankerplex Databases]$ sudo sqlite3 com.plexapp.plugins.library.db “pragma integrity_check;”
[sudo] password for tankertux:
Error: no such collation sequence: naturalsort
[tankertux@tankerplex Databases]$ sudo sqlite3 com.plexapp.plugins.library.db “DROP index ‘index_title_sort_naturalsort’”
[tankertux@tankerplex Databases]$ sudo sqlite3 com.plexapp.plugins.library.db “pragma integrity_check;”
ok
[tankertux@tankerplex Databases]$ sudo sqlite3 com.plexapp.plugins.library.db “DELETE from schema_migrations where version=‘20180501000000’”
[tankertux@tankerplex Databases]$ sudo !!
sudo sudo sqlite3 com.plexapp.plugins.library.db “DELETE from schema_migrations where version=‘20180501000000’”
[tankertux@tankerplex Databases]$ sudo sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”
ok
[tankertux@tankerplex Databases]$ sudo sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”
ok
[tankertux@tankerplex Databases]$ sudo sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
-bash: dump.sql: Permission denied
[tankertux@tankerplex Databases]$ sudo sqlite3 com.plexapp.plugins.library.db .dump > ~/dump.sql
[tankertux@tankerplex Databases]$ cd
[tankertux@tankerplex ~]$ sqlite3 com.plexapp.plugins.library.db < dump.sql
[tankertux@tankerplex ~]$ sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”
ok
[tankertux@tankerplex ~]$ cd -
/home/tankertux/appdata/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases
[tankertux@tankerplex Databases]$ ls -la
total 1856336
drwxr-xr-x. 2 nobody users 4096 Mar 4 05:52 .
drwxr-xr-x. 7 nobody users 96 Dec 15 2018 ..
-rw-r–r–. 1 nobody users 101199872 Mar 3 23:28 com.plexapp.dlna.db
-rw-r–r–. 1 nobody users 196608 Mar 3 23:29 com.plexapp.dlna.db-shm
-rw-r–r–. 1 nobody users 96667592 Mar 3 23:29 com.plexapp.dlna.db-wal
-rw-r–r–. 1 nobody users 22784000 Mar 4 16:31 com.plexapp.plugins.library.blobs.db
-rw-r–r–. 1 nobody users 27165696 Feb 23 03:04 com.plexapp.plugins.library.blobs.db-2020-02-23
-rw-r–r–. 1 nobody users 61572096 Feb 26 03:05 com.plexapp.plugins.library.blobs.db-2020-02-26
-rw-r–r–. 1 nobody users 14814208 Feb 29 03:00 com.plexapp.plugins.library.blobs.db-2020-02-29
-rw-r–r–. 1 nobody users 14814208 Mar 3 03:03 com.plexapp.plugins.library.blobs.db-2020-03-03
-rw-r–r–. 1 nobody users 131072 Mar 4 16:31 com.plexapp.plugins.library.blobs.db-shm
-rw-r–r–. 1 nobody users 15286160 Mar 4 16:31 com.plexapp.plugins.library.blobs.db-wal
-rw-r–r–. 1 nobody users 183432192 Mar 4 16:38 com.plexapp.plugins.library.db
-rw-r–r–. 1 nobody users 221611008 Feb 23 03:04 com.plexapp.plugins.library.db-2020-02-23
-rw-r–r–. 1 nobody users 222457856 Feb 26 03:04 com.plexapp.plugins.library.db-2020-02-26
-rw-r–r–. 1 nobody users 222803968 Feb 29 03:00 com.plexapp.plugins.library.db-2020-02-29
-rw-r–r–. 1 nobody users 224701440 Mar 3 03:03 com.plexapp.plugins.library.db-2020-03-03
-rw-r–r–. 1 nobody users 1736704 Mar 4 16:39 com.plexapp.plugins.library.db-shm
-rw-r–r–. 1 nobody users 227813224 Mar 4 16:39 com.plexapp.plugins.library.db-wal
-rw-r–r–. 1 tankertux root 220797952 Dec 2 15:55 temp.db
-rw-r–r–. 1 nobody users 19156992 Mar 4 16:33 tv.plex.providers.epg.cloud-0f77813d-8e03-413b-bce7-281c137f49fa.db
-rw-r–r–. 1 nobody users 32768 Mar 4 16:33 tv.plex.providers.epg.cloud-0f77813d-8e03-413b-bce7-281c137f49fa.db-shm
-rw-r–r–. 1 nobody users 1617096 Mar 4 16:33 tv.plex.providers.epg.cloud-0f77813d-8e03-413b-bce7-281c137f49fa.db-wal
[tankertux@tankerplex Databases]$ ls com.plexapp.plugins.library.db-*
com.plexapp.plugins.library.db-2020-02-23 com.plexapp.plugins.library.db-2020-02-29 com.plexapp.plugins.library.db-shm
com.plexapp.plugins.library.db-2020-02-26 com.plexapp.plugins.library.db-2020-03-03 com.plexapp.plugins.library.db-wal
[tankertux@tankerplex Databases]$ sudo rm com.plexapp.plugins.library.db-shm
[sudo] password for tankertux:
[tankertux@tankerplex Databases]$ sudo rm com.plexapp.plugins.library.db-wal
[tankertux@tankerplex Databases]$ mv ~/com.plexapp.plugins.library.db com.plexapp.plugins.library.db
mv: try to overwrite ‘com.plexapp.plugins.library.db’, overriding mode 0644 (rw-r–r–)? y
mv: cannot move ‘/home/tankertux/com.plexapp.plugins.library.db’ to ‘com.plexapp.plugins.library.db’: Permission denied
[tankertux@tankerplex Databases]$ sudo !!
sudo mv ~/com.plexapp.plugins.library.db com.plexapp.plugins.library.db
[tankertux@tankerplex Databases]$ sudo chown nobody:users com.plexapp.plugins.library.db

The terrible scanning issue remains:

As a test, in my second server under a non-premium user (which has never had a music library), I created a music library pointing to the same content, and things scanned into it perfectly, so I am aware that the music library can work as expected, but simply is not in my case on my primary server.

However, I should not need to delete my entire library and start fresh in order to take advantage of a music library (I would like my recently added and my watched status to remain undamaged).

I will note that I’ve taken the steps of verifying my permissions and also creating a new music library with a new name in case there was some sort of namespace collision. Both scenarios end the same, where the majority of albums are scanned in as the artist most recently modified.

1 Like

Create a new music library, that only contains/has access to 1 folder (album) that you see this issue with. Then upload the PMS logs here after it shows the matching issue.

I have determined the cause of my issue while replicating it in another library. In the end, I did not have write privileges in /tmp in my container.

I discovered this by replicating the scanning issue with a small 2 artist music library and found that I could not download the logs to send to you. I would get a 500 Internal Server Error when I tried to download the logs, and the console reported that it could not write them to /tmp. I have the container /tmp directory bind mounted to /dev/shm/tmp on the host system, which had somehow changed from being owned by the plex user, to being owned by root.

By fixing ownership and permissions on the host directory (and therefore /tmp in Plex), I found that Plex is once again matching my Artists/Albums correctly. To further support this diagnosis, I checked my secondary server which did not have scanning issues, and it has correct permissions in its /tmp directory.

2 Likes

Awesome that it’s working! And thanks for posting your findings for others to come across should they have these symptoms.

2 Likes