Request custom metadata from mysql

Dear all,

I am looking for an agent which queries a custom local mysql database with imdb_id to fetch addtional information which should be prepended to the description of a movie. Is there any plugin around or could someone help me out with a basic snippet?

I have found a way to do it, but struggeld over some questions:

  • Is there a way to access already existing data from other agents?
  • How can i force overwrite (and lock) metadata?

PlexPlug-inFramework.pdf [765.6K] can be downloaded there and contain the metadata structures:

Simplified table i made:
https://github.com/ZeroQI/Hama.bundle/blob/master/Metadata.md

Good hints there on development:

To my knowledge, you can’t control the lock of metadata from the agent side
You can review already present metada and allow agent to cascade (but need to use the same guid to do so)

thanks for your feedback, I will review the information :slight_smile:

Regarding the cascade, do you have a running snippet as example? Currently I am solving my problem with an own “website” as interface between the mysql and plex, which can be queried with imdb_id, serving data in json format.

Nevertheless, I only want to prepend my own data to the description which already exists (there are not many other columns available on the mobile client :frowning: ). Currently I am solving this by manually refetching the summary (copied code from other agent), but want to avoid this roundtrip.

the main metadata movie agent (which one?) you use will have to be amended to authorise a secondary agent.
This agent will use the same guid as the main agent (imdb_id ?) and whose role it to prep-end to the description if not already there.

You basically didn’t specify which agent you use, nor shared the code you have so far (unless by code you meant description). Read my agent code, will give you ideas…

I have basically found my answer at https://forums.plex.tv/discussion/comment/136393/#Comment_136393.