Writing a Utility for Metadata Generation

I was recommended to post in the developer forum from the PLeX subreddit- hoping someone can help me out. :slight_smile:

Super stoked to have finally built my own home server and gotten all my content onto it. Like a lot of you, I’ve added all my music videos to my collection, and they populate in the Music library, but not being able to seamlessly switch between audio and video playback during shuffle is a huge pain, so I also have a Music Videos library.

In this library, everything just shows up with the name- and no year- so I’d love to write a utility that:

  1. Crawls my library for all MP4 files.

  2. Finds the matching MP3 file (just an extension replace at the end).

  3. Extracts certain metadata (Title, Year, Artist, basically)

  4. Updates the PLeX metdata for the video.

What I’m having trouble figuring out is how to find the metadata files for the videos and easily update them. For example, if I know the path of the MP4, is there an easy way to calculate the path to its XML file anywhere? Are there more than one XML file (this seems to be the case)?

If so, which one do I update to reflect it in the server?

PLeX doesn’t read/use NFO files, so I’m outta luck there, right?

Thanks!

None of them. The metadata is stored in a database. The XMLs are generated based on the XML and what clients use so they don’t have to directly access the database. I would not advice modifying the database unless you are comfortable using SQLite. You can mess up the database if you do something wrong.

There is a 3rd party plugin. Metadata agents for exported XBMC library

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.