Plex Media Server TVMaze Metadata Agent

srob650 wrote 3 years ago:

Hi all,

I've asked the Plex devs to add a tvmaze metadata agent to their roadmap, help me out by chiming in with your support in this thread!


Jan wrote 3 years ago:

Hi srob,

Thanks for taking the first steps to getting a metadata agent on plex. We've just posted your request on our twitter and facebook. Hopefully someone who can help will see it. :)

srob650 wrote 3 years ago:

Awesome, thanks Jan! If I find out it's not too complicated to make one myself I'll happily do so and post information here :)

Seven wrote 3 years ago:

please replay with any update related plex pugin

srob650 wrote 3 years ago:

Still waiting on a reply from the Plex devs. You can follow the thread I linked in the first post but I will also post back here if/when I/they develop one :)

vBm wrote 2 years ago:

Too bad there's no development on this front yet since tvdb and that other default agent is just horrible, more than half of the 'matches' are in fact mismatches ;x

srob650 wrote 2 years ago:

Sorry I haven't posted any updates. I have actually been using my TVMaze Plex agent for a few weeks now but there have been two outstanding issues which I want resolved before I feel that it's ready for the public. Unfortunately, getting help from devs or anyone on the forums is about as easy as guessing the nuclear launch codes...and I just simply don't have the free time to hack through every little thing. Perhaps what I'll do is just put it up on GitHub and ask for help, maybe some kind soul will jump in and help me fix those issues.


Jan wrote 2 years ago:

Hi srob,

Posting it on github isn't a bad idea. We'll help you to communicate with plex and its community if necessary.
Maybe a dev from there will help you hack away the issues.

cheers,

Jan

srob650 wrote 2 years ago:

Took me a while to get around to this, but here's the GitHub link. Please share this with anyone who knows how to make Plex Agents!

The code works for the most part, but read the 2 caveats in the readme so you know what to expect if you are trying this out. Hopefully someone can help and we can get this out into the wild!


Jan wrote 2 years ago:

Hi Rob,

Great job and kudos for persevering. We'll post it on our social channels tomorrow and possibly ask for some support from the guys at plex.

cheers,

Jan

srob650 wrote 2 years ago:

Update:

It's been a long time, but I've recently revisited this and updated the code a bit. The agent still has issues with date-based tv shows, and I can't pinpoint what is going wrong. Honestly at this point I feel as though there is something in the underlying Plex code that is messing things up, because as best I can tell I've implemented things properly.

Anyhow, to get around the date-based issue, all you have to do is rename any date-based shows with their corresponding season and episode numbers instead (correlated to this site, obviously :p). If people are interested I can post a script to help do batch renaming to that end.

Grab the new bundle and try it out!

abecx wrote 2 years ago:

srob650 wrote:
Update:
It's been a long time, but I've recently revisited this and updated the code a bit. The agent still has issues with date-based tv shows, and I can't pinpoint what is going wrong. Honestly at this point I feel as though there is something in the underlying Plex code that is messing things up, because as best I can tell I've implemented things properly.
Anyhow, to get around the date-based issue, all you have to do is rename any date-based shows with their corresponding season and episode numbers instead (correlated to this site, obviously :p). If people are interested I can post a script to help do batch renaming to that end.
Grab the new bundle and try it out!

Do you have an example python script to simulate what plex would be sending to your agent?

srob650 wrote 2 years ago:

abecx wrote:
Do you have an example python script to simulate what plex would be sending to your agent?

Do you mean the Metadata objects that plex sends after doing a library scan? That I don't have

abecx wrote 2 years ago:

I've used the fuzzy logic from the python date parser before to identify random date strings from files, it may help you. Since I dont know what Plex is sending and I cant get the debugLog to work to see, I'm simply guessing that its having a problem parsing the date as that was a common problem for me when using TVmaze and random torrent files. Also your Conan example just so happens to fall on my birthday.

>>> from dateutil import parser
>>> parser.parse("Conan - 2016-01-04.mkv", fuzzy=True)
datetime.datetime(2016, 1, 4, 0, 0)
>>> parser.parse("Conan - 2014 09-1", fuzzy=True)
datetime.datetime(2014, 9, 1, 0, 0)

srob650 wrote 2 years ago:

Parsing the dates is not the problem, I can do that with a regex pretty easily. The problem is that Plex seems to not like certain years as season numbers. Beyond that I don't know, and they are very hard to get a hold of to help troubleshoot. The forum posts I've made have been largely not responded to and at one point a Plex dev came to my GitHub page to try to help but then never actually did. At this point I don't plan to work on it anymore unless I get some concrete help on how to make date-based work properly.

Kosire wrote 12 days ago:

I have updated srob650's agent with a few major changes:

- Added support for cast with character photo (fallback to actor photo)

- Added support for episode thumbnailsAdded show's status (Running, Ended, Cancelled, etc) in content rating as TVmaze doesn't provide content rating (TV-MA, TV-14, etc)

- Renamed all instances of TVMaze to TVmaze as per TVmaze's brand guidelines

- Removed all instances of medium images as the original will always be there if the medium exist.

Get it here: https://github.com/Kosire/tvmaze-plex-agent


Jan wrote 10 days ago:

Kosire wrote:
I have updated srob650's agent with a few major changes:

- Added support for cast with character photo (fallback to actor photo)

- Added support for episode thumbnailsAdded show's status (Running, Ended, Cancelled, etc) in content rating as TVmaze doesn't provide content rating (TV-MA, TV-14, etc)

- Renamed all instances of TVMaze to TVmaze as per TVmaze's brand guidelines

- Removed all instances of medium images as the original will always be there if the medium exist.

Get it here: https://github.com/Kosire/tvmaze-plex-agent

Nice job. Rob will be happy to see someone helping out.