I have quite an expensive Music library. Everything is made of FLAC files, all properly tagged. Plex reads all local metadata just fine. For some of my albums, I also have music videos. They are sitting next to the flac files, have the -video extension and it works just fine. But I realized it was not easy to play all music videos of the albums in a row, you. have to play them one by one.
So for my latest album with music videos, I decided to add full length music video file, with proper chapters, within the album directory. But this one never shows up anywhere. I have tried the following:
Original MKV file is not showing up. So I tried remuxing to MP4 and to embed proper artist tags, within the file, no help
Moved the file to a global music video folder but following the documentation. I updated the agent configuration, I refreshed metadata for the artist, I re-scanned library files, still nothing
I looked at debug (and even verbose) logs. No signs of the file nor global video folder being scanned
As for playing more than one music videos in a row that are stored as local extras in your music library… you can (multi) select them and add them to a playlist. If you have a number of them that’ll give you your personal music tv
As for your file not being recognized…
That should actually be working. I have most of my music videos stored as MKV files and they’re showing up just fine.
Can you try this?
remove the music video from the folder
refresh artist metadata and wait for it to complete
review the log settings of your server to be set to debug (but not verbose) → Settings > [Server Name] > General > Enable Plex Media Server debug logging
return the file
refresh artist metadata and wait a moment for it to “settle”
pick the following 2 files from your PMS logs and upload them here (or upload the full zip file)
Here are the logs. The file in question is /data/Music/Les Cowboys Fringants/[2021] Le Grand Retour Des Cowboys Fringants À L’OSM/Le Grand Retour Des Cowboys Fringants À L’OSM-live.mkv"
Not a permissions issue. I’m going to create a new collection and/or new server to see if I can pinpoint the problem more easily in verbose logs. I’ll report back what I find.
This artist has 18 Albums, all located as subfolders of the parent artist folder. 2 of these have extra music videos files in them.
If I only put one of the two albums, it works. But as soon as I have two albums with music videos in it, no ‘Extras’ videos show for the artist. Is this a known limitation ?
No… I cannot reproduce this.
I added some additional videos as extras to some of my albums (same artist, different albums) and they’re all showing alright.
I narrowed down the issue to just these two albums. And I moved from my server to my local laptop, on a different OS and am able to reproduce. Logs should be much thinner now, will hopefully extract something from it.
I still can’t see anything meaningful in the logs, everything seems to go well. But I narrowed down the problem even more.
Out of these two albums, only the OLD one is actually posing a problem. Somehow, having it breaks the Extras for the whole artist and other albums. Taking it in isolation, with just one track (plus its video file), Extras are not showing up neither. So it’s not a matter of having two albums music videos. It’s just a matter of having tracks from this album that break the whole thing. The strange thing is that the matching happens correctly at the track level: I can see the small screen icon and I can play the video just fine. But it doesn’t show up on the artist page in the Extras section.
I’m trying to play with the metadata to try to understand.
I made a diff of the Media Scanner Matcher logs for the mp3 file and the flac file. The only difference seems to be that something kills the child job in the flac case (though it says it exits successfully)
I think I found the root cause of the bug in the local media logs:
2021-06-15 22:27:40,863 (7f6215d26b38) : CRITICAL (agentkit:1095) - Exception in the update function of agent named 'Local Media Assets (Artists)', called with guid 'plex://artist/5d07bc0b403c6402904b0877' (most recent call last):
File "/usr/lib/plexmediaserver/Resources/Plug-ins-85f0adf5b/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1093, in _update
agent.update(obj, media, lang, **kwargs)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-85f0adf5b/LocalMedia.bundle/Contents/Code/__init__.py", line 201, in update
for genre in genres:
File "/usr/lib/plexmediaserver/Resources/Plug-ins-85f0adf5b/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 107, in <lambda>
_getiter_ = lambda x: x.__iter__(),
AttributeError: 'NoneType' object has no attribute '__iter__'
Looks like the code is expected a genres array. Sure enough I added a “genre” in the metadata tags of the flac file and it now works. This has to be a bug right, I can’t see why the genre tag would be mandatory ?
audio_helper = audiohelpers.AudioHelpers(track.items[0].parts[0].file)
if media.title.lower() not in GENERIC_ARTIST_NAMES:
if audio_helper and hasattr(audio_helper, 'get_track_genres'):
genres = audio_helper.get_track_genres()
for genre in genres:
if genre not in album_genres:
album_genres.append(genre)
Not sure why this breaks on the flac file and not on the mp3 file, as neither of them had genres set up in the metadata.
Looking at get_track_genres:
def get_track_genres(self):
genre_list = []
try:
tags = MFile(self.filename)
genres = tags.get('\xa9gen')
if genres is not None and len(genres) > 0:
for genre in genres:
for sub_genre in parse_genres(genre):
if sub_genre.strip():
genre_list.append(sub_genre.strip())
except Exception, e:
Log('Exception reading (genre): ' + str(e))
return genre_list
I don’t see how genre_list can be None
EDIT: Actually, each format has its own audio helper. And the flac one has the following implementation of get_track_genres:
I guess tags.get('genre') can return None without throwing an Exception. I don’t know much about MFIle though. Let mw know if I can be of any more help here, or if this will be fixed soon. Thanks!
Interesting. I have an MP3 and FLAC music library. Based upon your research I did a test against my music video library, by adding ‘music video’ genre to an artists music video nfo file.
(I am using the XBMCnfoMoviesImporter plugin)
After refreshing the metadata, the music videos show up under the artist for the MP3 and not the same artist for FLAC.
Update: I tried again with a different artists and it doesn’t work for either music library. Maybe it was a fluke.
Would you mind sharing the full (non-verbose) logs? Your last attachment only contained the Plex Media Server.log file – the previous files (Plex Media Server.[1-5].log) and the scanner/matcher files might also be helpful.