Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New TV agent beta #52

Closed
mrjohnpoz opened this issue Mar 2, 2021 · 18 comments
Closed

New TV agent beta #52

mrjohnpoz opened this issue Mar 2, 2021 · 18 comments

Comments

@mrjohnpoz
Copy link

mrjohnpoz commented Mar 2, 2021

So plex now includes their new TV agent in the latest release.. 1.22.0.4136

This seems to have broken TV ratings like when they released their new Movie agent. Is there someway to get this to work, or will there be an update coming that fixes this? I sure hope so - I love my consistent and current rating using this..

I have tvdb set as ratings in the new agent.. But the few shows I have refreshed metadata on, and then ran the update tool doesn't seem to get back the imdb ratings.. Blacklist is one example. It shows a new tvdb icon and 87% as the rating..

@rg9400
Copy link

rg9400 commented Mar 6, 2021

I noticed this as well. Please let us know if you need any sample data to enable the logic for TV shows. The external guids appear in the exact same format as for movies, both at show and episode level. The episode guids are a bit spotty though.

@mrjohnpoz
Copy link
Author

Yeah whatever info/data/logs/etc you would need just let us know.. Happy to provide whatever info is needed to get this tool to do the ratings.. They are current, they are all from same source, etc. Love this tool and would love to have it back to doing ratings for tv shows..

@mynttt
Copy link
Owner

mynttt commented Mar 7, 2021

Some sample data would really help here! I don't have time to set up a test library currently but with some idea of how the IDs look and a sample database I could implement support for this feature in the next days.

@mrjohnpoz
Copy link
Author

mrjohnpoz commented Mar 7, 2021

what would you like exactly - just let me know and can provide it.. I have some shows that I have not refreshed the data metadata on and then some that have.., Do you need a dump of the specific set of the db. I can send you the whole db if you want. etc..

@mynttt
Copy link
Owner

mynttt commented Mar 9, 2021

Sending me your entire database would work pretty good! I then don't have to deal with setting up sample data its best if you send it to my mail instead of posting it here tho.

@mrjohnpoz
Copy link
Author

mrjohnpoz commented Mar 9, 2021

How would be the best way to do that? Sure don't want to just post that here ;) I could post it for you to grab - or could just email it too you (what address).. Just let me know.. I take it you would just want/need com.plexapp.plugins.library.db

@mynttt
Copy link
Owner

mynttt commented Mar 9, 2021

Alright I've got the database. So right now it looks like Plex stores the IMDB id for some of the new items directly within the database. I'd probably release an update for that case today because it should be quick to implement.

For items that use the TVDB there won't be support until the v4 API is completly implemented. I've checked it today and it looks like it works better now it at least resolves remote ids by now. But full support for the v4 API could still take weeks because I'm busy right now and won't have much time to spare for UpdateTool at the moment.

@rg9400
Copy link

rg9400 commented Mar 9, 2021

Are you talking about at show level, or at episode level? At show level, if there are cases without external IMDb IDs, we can send them to Plex so they can populate them on their backend. Episode level will be very iffy, though Plex does seem to be populating the IDs in some cases.

Accuracy is high when TVDB, TMDB, and IMDb all match, but where there are discrepancies and the shows are not 1:1 on the platforms, then all bets are off. An example is Steven Universe and Steven Universe Future where there are 2 shows on TVDB/TMDB, but only a single entry on IMDb, so both matched shows would have the same IMDb ID. On the opposite hand, The Haunting is a single entry on TVDB but multiple entries on IMDb, so the IMDb ID will correspond to season 1 (The Haunting of Hill House), but the relevant show will have no second season. Finally, episode orders are flexible now, so you could end up with S01E28 even though that does not exist on IMDb.

The point with the above is just to highlight some edge cases, which we probably just have to live with. It might mean episode IDs are more accurate when available though.

@mynttt
Copy link
Owner

mynttt commented Mar 9, 2021

Sometimes there is only a TVDB ID available so far most of the times I've randomly looked at entries it appears that the IMDB ID is directly stored. To deal with cases where only a TVDB ID is available tho I'd need to implement the TVDB v4 API because those IDs are in the v4 format.

The reason while that will be such a big piece of work is because I'd like to keep v3 compatibility. In v3 and v4 the way that an item is adressed changes. To efficiently lookup v3 items in v4 a caching system is required and I don't have time to deal with that right now. So I'll probably try to support the v4 lookup in the next weeks and ignore the v3 backwards compatibility until v3 finally shuts down.

@mrjohnpoz
Copy link
Author

Sweet! Looking forward to the update.. Yeah before - atleast where I bothered to look, and there was entries for the specific episode on imdb you would get ratings for that specific episode. I got some julie child french cooking episodes, and those never matched - because imdb doesn't have any rating for them.. which to be honest is odd ;)

Whatever you can do to get what you can working that will be great.. This is my fav tool ever for plex that is for sure.. Tautulli is slick and all - but I like what this provides more ;) Its more user facing.. And something the user would care about - the user doesn't really care about the info that tautulli provides for example. But they do like ratings ;)

@rg9400
Copy link

rg9400 commented Mar 9, 2021

There should also be TMDB IDs populated. I have a bunch of cases where there is no IMDb ID, but TMDB exists. Not sure if that is easier to work with compared to TVDB. I can't fault you for not wanting to touch TVDB until later on, though I do have a few with only TVDB IDs, but thankfully it isn't a ton.

@mynttt
Copy link
Owner

mynttt commented Mar 9, 2021

Alright with 1.5.0 it is now possible to let UpdateTool affect these new libraries as well! However this will only work for items within the library when Plex stores the IMDB ID within the local database. Fallback for TMDB/TVDB will come later when the new TVDB v4 API is implemented. As of right now there will be no log output if such a fallback ID is encountered it will simply be swallowed. This is to not spam the log with obvious information. This update is an opt-in so please read here how to whitelist libraries for it.

@mrjohnpoz Thank you for the kind words =) In your case you would have to opt-in with the library ID 6 as that's the library ID that I've seen in the database that you sent me! Let me know how it works out for you!

@rg9400 So far I've seen those TMDB IDs being in the same format as the TVDB IDs so I suspect something might have changed there as well as the old TMDB IDs where also adressed in the old TVDB format. I'll probably take a look at it when I'm doing the TVDB update.

@mynttt
Copy link
Owner

mynttt commented Mar 9, 2021

I'll leave this issue open until TMDB/TVDB fallback has been fully implemented!

@rg9400
Copy link

rg9400 commented Mar 9, 2021

I tested it, and it seems to be working as intended. I haven't checked how many cases it missed, but it seems to have populated most of my shows in Recently Added and episodes that aired at least a few days ago

@mrjohnpoz
Copy link
Author

Dude you rock!!! I so added set my tv lib - your right ID 6, and the few I have checked have their imdb rating back.. Blacklist was one for sure I know use to have them and they went away after moving to the new agent.

I will go through some of the more popular shows - seems some of the early paw patrols have imdb rating back - but later ones do not.. showing tmdb ratings.. or blank..

Sure looks like a good fix to me - thank you so much! Looking at some current stuff like wandavision, blacklist, men in kilts, shameless, for all mankind - all look like they are good..

@COTMO
Copy link

COTMO commented Mar 10, 2021

Before switching to the new agent I made 2 test libraries with the new beta agent. One with ratings from TMDB and one TVDB. With the new update 1.5.0 it did change all the rating in both libraries perfectly. Were there isn't an IMDB rating available but the there is an TMDB or TVDB rating it leaves the rating unchanged, what is ok for me.
So thanks and keep up the good job!!!

@mynttt
Copy link
Owner

mynttt commented Mar 10, 2021

I've separated the code for the APIs today and the current plan is to add support for TVDB v4 and TMDB v4 IDs soon.

For TVDB it will work the following way:

  • v3 is supported until it is officially killed so everyone can still use their free legacy keys
  • v4 will be implemented in a way that v3 IDs are still supported so old v3 libraries are still compatible with this tool even when the v3 API is killed
  • to unlock the TVDB fallback for the new plex series/movie agents a v4 pin is required tho which sadly costs money (I belive 10€/months which is pretty hefty for what it does....)

For TMDB it will work the following way:

  • v3 is supported until it is officially killed (v4 is planned right now but is not realized at all right now)
  • right now the issue is that there are new v4 IDs that I'm not able to query for with the v3 API. I've made a post in their support forum to address this. If they add the endpoint described there TMDB fallback will be supported as well. Else it will be impossible to convert these v4 IDs.

@mynttt
Copy link
Owner

mynttt commented Mar 12, 2021

TVDB v4 is now supported and is also able to lookup old v3 IDs (which is a pretty resource intensive ring around the rosie and only got possible through an intelligent caching system). UpdateTool will automatically detecte either a v4 Pin or v3 legacy key and then choose between the two. I'll close this issue now.

@mynttt mynttt closed this as completed Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants