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

Please add support for TheMovieDB and TheTVDB #72

Open
mbirth opened this issue Nov 29, 2015 · 18 comments
Open

Please add support for TheMovieDB and TheTVDB #72

mbirth opened this issue Nov 29, 2015 · 18 comments

Comments

@mbirth
Copy link

mbirth commented Nov 29, 2015

Please add support for those two so that we can use NFO files if available and fall back to the other agents.

        accepts_from   = ['com.plexapp.agents.localmedia','com.plexapp.agents.opensubtitles','com.plexapp.agents.podnapisi','com.plexapp.agents.plexthememusic','com.plexapp.agents.subzero','com.plexapp.agents.thetvdb','com.plexapp.agents.themoviedb']
        contributes_to = ['com.plexapp.agents.thetvdb','com.plexapp.agents.themoviedb']
@SlrG
Copy link
Collaborator

SlrG commented Dec 1, 2015

Can you please elaborate a little bit more? When I add those lines, the additional agents appear under tvshow settings. I can drag them around, but when I enable them, the setting doesn't stick. As soon as I change the tab, the alternate agent gets disabled again. How do you make use of the additional agents when local NFOs are missing?

@mbirth
Copy link
Author

mbirth commented Dec 1, 2015

For me, the checkmarks stick. Plex tries from top to bottom, so XBMCnfo* has to be on top. If this doesn't find a NFO file, Plex will try the next agent from the list.

@SlrG
Copy link
Collaborator

SlrG commented Dec 2, 2015

Okay. :) Thank you for your explanation. I'll try to find out, what fails on my system.

@SlrG
Copy link
Collaborator

SlrG commented Dec 7, 2015

It was my addblocker which was at fault. Settings do stick now. But no matter how I drag the agents order I don't get the effect you describe. No fallback to online agent when XBMCnfo agent fails due to missing nfo files. Can you provide me some screenshots or a video how you do it and how and when it is working?

@mbirth
Copy link
Author

mbirth commented Dec 7, 2015

I'm not sure whether I had to "Fix incorrect match" to have it match. You're right, looking at the code, it tries various shady things to match the folder against some data instead of just giving up if there's no NFO file. That should be fixed, then.

@SlrG
Copy link
Collaborator

SlrG commented Dec 7, 2015

Hmm... If I remember correctly rematching single items was always possible to use. Even when not adding something to contributes_to and accepts_from. What code do you look at? Is this something for the plex devs to fix? I would really like to incorporate such automatic fallback mechanisms but I have no idea how to do it at the moment.

@mbirth
Copy link
Author

mbirth commented Dec 7, 2015

In the init.py … it's trying really hard to get any match and falls back to just generating something based on the filenames. I guess if it wouldn't do that, the next agent should take over.

@SlrG
Copy link
Collaborator

SlrG commented Dec 8, 2015

Hmm... I think I understand what you refer to. But if you look at the Movies agent, it quits immediately when no nfo file is found. But even then, there is no automatic fallback to MovieDB or freebase for me, even if I added and enabled them. I removed all metadata from a movie in my testing library, made sure it is available on Freebase and MovieDB. I enabled freebase and put it after the XBMCnfoMoviesImporter in settings. Scanning leaves me with a movie without any info. The same happens when I select MovieDB. So I somehow doubt removing those things you mention from the tvshows agents will have a different outcome. I'll try it when I have the time. I would be glad however, if you could try yourself too and provide me with a working pull request.

@mbirth
Copy link
Author

mbirth commented Dec 8, 2015

After finding some official documentation, I now think the correct way would be to set fallback_agent instead of the other two. I'll try this in the next few days and report back.

@SlrG
Copy link
Collaborator

SlrG commented Jan 17, 2016

Any news on this? I can't get it to work even using fallback_agent. Did you have more knowledge or luck? :)

@gadgetchnnel
Copy link

I've been taking a look at this and done some testing and it looks like fallback_agent only works if the search method doesn't return a MetadataSearchResult for the item being resolved. Because currently it always appends a result (guessing the show name from the filename if there is no tvshow.nfo file) it will never fail to find a result and the fallback agent is never used.
By changing the method to not return a result if there is no tvshow.nfo file I was able to successfully get this to work (at least when manually matching using Match or Fix Incorrect Match).

Maybe there could be an additional preference (such as "guess show name from filename if tvshow.nfo not found") which would allow this default behaviour to be changed. By doing this (and also setting the fallback_agent to com.plexapp.agents.thetvdb) we would be able to use TheTVDB as a fallback.

@SlrG
Copy link
Collaborator

SlrG commented Oct 20, 2016

Cool. Thank you very much for this information! I'll give it a try.

@SlrG
Copy link
Collaborator

SlrG commented Oct 28, 2016

@gadgetchnnel:
Can you show me the lines of code you changed, to make this work? That would be cool. I tried a lot of things and was not able to get it to work. :( Armchair developer only. :)

@Flintr
Copy link

Flintr commented Jan 6, 2017

@gadgetchnnel Yes, please share the code! I need a TVDB fallback to incorporate this plug-in into my Plex workflow (which I really want to do) 😄

@M0UL
Copy link

M0UL commented Feb 24, 2017

any update on this?

@SlrG
Copy link
Collaborator

SlrG commented Feb 24, 2017

The newest versions have a contributes_to tag. If this is enough to suit your needs, I don't know.

@M0UL
Copy link

M0UL commented Feb 25, 2017

this does not seems to work. the agents now shows on the list of agents of thetvdb agent. not the other way around. and adding XBMCnfoTVImporter on the top of the tvdb agent . then it wont import anything.

what try to do is use the XBMCnfoTVImporter agent to import the show info. the use the tvdb date to get everything else.

@SlrG
Copy link
Collaborator

SlrG commented Feb 25, 2017

In the forum thread a user mentioned a xml nfo importer agent. It seems to do what you want. Maybe you want to give it try.

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

5 participants