OFDB Agent

Metadata agent using www.ofdb.de
Hi,

since Moviepilot often just delivers some background information about a movie instead of the real plot I created a Metadata Agent that grabs the movie plot from [OFDB](http://www.ofdb.de). Besides this also the genres of OFDB are used.

Install
Download the attached .plexapp install file and double click it.

Metadata Agent Settings
An example of how OFDB works the best way:

[list=1][*]Open the Media Manager and go to the Metadata Agent Settings:

http://img.skitch.com/20101222-phg84enc66if9ffj7gbb93km1.png




[*]Select **Freebase** in the left column. On the right, tick the box in front of OFDB and drag the item to the top of the list:

http://img267.imageshack.us/img267/7048/ordern.jpg




[*]When creating/editing a section, choose Freebase as Primary metadata agent:

http://img.skitch.com/20101201-g2jss3ym3xqir5nj81ysbsq6km.png


[/list]

Notes
[list]
[*]The OFDB agent is a secondary agent that works for the Freebase agent.
[*]OFDB provides PMM with the following info:
[list]
[*]summary in German (from OFDB)
[*]movie ratings of OFDB
[*]genres of OFDB[/list]
[/list]
The search process
This is (simplified) how the agent works:
[list=1]
[*]PMM tries to grab the movie title and year from the file or foldername;
[*]The Freebase agent does a lookup and we hope the IMDB id can be found, as this is the key piece of information. If the IMDB id cannot be found, the search stops here;
[*]OFDB uses the IMDB id to lookup movie info on OFDB, if it finds the movie, the info is returned. If the agent can't find the movie on OFDB, other active agents lower on the list can provide the info.
[/list]

Changelog
[list]
[*]1.0:
[list][*]Initial release
[/list][*]1.1:
[list][*]Only the movie summary is taken from OFDB; you can use the Moviepilot and/or German Genres (+TheMovieDB) metadata agents for more/other information in German if you wish
[/list][*]1.2:
[list][*]The OFDB agent also gets the movie genres from OFDB
[/list][*]1.3:
[list][*]Small changes (in genre regex)
[/list][*]1.4:
[list][*]The OFDB agent now also gets the movie ratings from OFDB
[/list][*]1.5:
[list][*]Users can choose not to use some (or all) information from OFDB this agent can retrieve through the plugin's Preferences
Mac OSX plugin installer:
OFDB-1.5.plexapp (84.9 KB)
Or download the .bundle file as a ZIP (unzip it and place the .bundle in Plex's plugin folder):
OFDB-1.5.bundle.zip (50.8 KB)
[/list][/list]

Hello someone,



Instead of duplicating existing code (and reusing the MP apikey), I would like to suggest that the OFDB agent just looks up the movie summaries on ofdb.de and let the other, existing agents do their current job. That way end users have more freedom to (not) choose MP, German Genres and/or OFDB.

Anyway, thank you for your contribution to Plex!! Let me know what you think!



Source: https://github.com/sander1/OFDB.bundle

Thanks for your feedback, sander!



First I thought a “all-in-one”-agent would be easier for the users to handle. But I guess you’re right, keeping it flexible seems to be the better way.



But concerning the genres in my opinion the results for German content with the existing agents were still quite unsatisfying, even with the agent that “translated” the genres. Therefore I enhanced the OFDB agent (based on your last version) and now I also grab the genres from OFDB. OFDB provides quite good genres, but no overkill as other agents/sites do.



I’d appreciate if you could take a look at the new version I uploaded, since I’m a complete Python noob.

Hey someone!

OFDB is doing a great job keeping the genres sensible! The most I could find for one film was for Inception. No “weird” (sub)genres anywhere :slight_smile:

I added a changelog to your forum post to keep track of everything, feel free to add/edit it. I put the latest changes back on Github too, which will make it easy to update in the future or pull the code into the official Plex repos.

Awesome, thanks!

Hi sander,



I uploaded a new version where I also take the movie ratings from OFDB. Basically for non-mainstream-movies the results are better than e.g. from Freebase, which often doesn’t have a rating at all.

Feel free to optimize the code and upload the improved version :wink:



May I also ask you to update the thread title? Since now more than just the plot is grabbed…



Thanks!

Looks good, someone! I pulled the change into the Github repo.

I’m thinking about changing the Moviepilot agent and add some preferences to it so users can select what info they want from the agent as there are now so many agents that can for example retrieve ratings, it sometimes if difficult to determine the right order of agents if you want summaries and ratings from one and genres from another. Maybe an idea for OFDB too?

But how could the user control these preferences in an easy way? I don’t have access to Plex at the moment… is there a way to configure agents? I haven’t seen something like that.



A different idea would be to split agents into smaller pieces. E.g. “Moviepilot (plot)”, “Moviepilot (Ratings)”, “OFDB (Genre)” and so on. That way the user would be as flexible as possible. But that also could be a little bit overkill, basically for new Plex users…

Agents can have preferences, just like other plugins. If they have them, the Preferences button becomes active:


http://img.skitch.com/20110112-g6dh3awn6e3r86hk5hu31tyhy3.png



I'll upload an new version in a minute!

(There is a small bug (already reported) in the above window regarding the width of text lines)

Ah, great, didn’t know that. Thanks for the update!

Hi someone, hi sander1! I noticed that I always get a sort title for english movies stating with the, a and an. Could you please look into integrating this for german and french movies too? Eighter by integrating this into the agent (ofdb got information for sort title) or by letting it generate manually (remove all eins and eines, ders dies and dases, aswell as all les, las, leses, ens and so on … hehe)?! Thank you.


I looked into it, but it looks like this can't be done at the moment. As far as I know it's not possible to set the sort title in an agent. Once this will be possible in a future version of Plex I'll add it.
But in case I'm wrong please tell me the name of the agent that offers this option. I guess for English titles beginning with "a", "an" and so on Plex handles this internally.

IMO this shouldn’t be the task of an agent, it should be handled by the Media Server. There’s already a Lighthouse ticket open about this (although it’s not publicly visible). For German there’s Das/Der/Die, but there’s more, right? Can anybody please complete the list?



Per-language article removal

[…]

German

* Das

* Der

* Die

Well, maybe also “Ein” would make sense. But in my opinion limiting it to “Der”, “Die” and “Das” is enough… but that’s just me.

I would actually prefer an option to get this done by the agents as there are exception. In case of the ofdb database this should be an easy task.

But let me contribute to your list anyways…



German: der, die, das; ein, eine

French: le, la, l’, les; un, une, des

Spanish: el, la, las, los; un, una, unos, unas

English: the; a, an, some



Examples:

[list]

[]Boot, Das

[
]Fisch namens Wanda, Ein

[]Leiche zum Dessert, Eine

[
]Strada, La

[]Enfant, L’

[/list]

Exceptions (the article is a substantive):

[list]

[
]Der mit dem Wolf tanzt

[]Eine wie keine

[/list]

Problematic (the article means sth in another language):

[list]

[
]LA Crash

[/list]

Country tag now possible with Plex 0.92! Could we have this added to this agent please?

somehow the ofdb agnt doesnt work. i installed it and added it to the freebase agent, moved it to the top and updated the media library. but the plots are still english. any idea ?

Very interesting agent. Could you please provide this agent in an format that is usable for the Windows/Linux version of the PMM.



Thanks.



-John


Hello John!
I've added a zip file to the first post of this thread with the plugin's .bundle file in it. You can extract that and place the .bundle in Plex's plugins folder.

Thanks a lot!

-John