# OFDB Agent

**URL:** <https://forums.plex.tv/t/ofdb-agent/7242>\
**Category:** Dev/API Corner\
**Tags:** scanner-agent-dev\
**Created:** [January 6, 2011, 12:46pm UTC](https://forums.plex.tv/t/ofdb-agent/7242 "2011-01-06T12:46:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![someone](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/someone/32/381_2.png) [@someone](https://forums.plex.tv/u/someone)\
**Post date:** [January 6, 2011, 12:46pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/1 "2011-01-06T12:46:34Z")

</div>

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](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](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](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](https://global.discourse-cdn.com/plex/original/3X/8/a/8a07981d3f530ff9af98e17eadce827b4bb0d21f.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](https://global.discourse-cdn.com/plex/original/3X/1/6/1651a0d68f6b9305db7513c6203297bd6fe2b173.zip) (50.8 KB)  
[/list][/list]

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [January 6, 2011, 6:32pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/2 "2011-01-06T18:32:08Z")

</div>

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](http://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](https://github.com/sander1/OFDB.bundle)

---

<div class="post-metadata">

**Author:** ![someone](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/someone/32/381_2.png) [@someone](https://forums.plex.tv/u/someone)\
**Post date:** [January 6, 2011, 9:39pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/3 "2011-01-06T21:39:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [January 7, 2011, 12:42am UTC](https://forums.plex.tv/t/ofdb-agent/7242/4 "2011-01-07T00:42:38Z")

</div>

Hey someone!  
  
OFDB is doing a great job keeping the genres sensible! The most I could find for one film was for [Inception](http://www.ofdb.de/film/195180,Inception). No “weird” (sub)genres anywhere 🙂  
  
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.

---

<div class="post-metadata">

**Author:** ![someone](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/someone/32/381_2.png) [@someone](https://forums.plex.tv/u/someone)\
**Post date:** [January 7, 2011, 12:46am UTC](https://forums.plex.tv/t/ofdb-agent/7242/5 "2011-01-07T00:46:47Z")

</div>

Awesome, thanks!

---

<div class="post-metadata">

**Author:** ![someone](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/someone/32/381_2.png) [@someone](https://forums.plex.tv/u/someone)\
**Post date:** [January 7, 2011, 10:32pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/6 "2011-01-07T22:32:43Z")

</div>

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 😉  
  
  
  
May I also ask you to update the thread title? Since now more than just the plot is grabbed…  
  
  
  
Thanks!

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [January 8, 2011, 8:13pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/7 "2011-01-08T20:13:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![someone](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/someone/32/381_2.png) [@someone](https://forums.plex.tv/u/someone)\
**Post date:** [January 11, 2011, 9:00pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/8 "2011-01-11T21:00:42Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [January 11, 2011, 11:15pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/9 "2011-01-11T23:15:09Z")

</div>

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

[http://img.skitch.com/20110112-g6dh3awn6e3r86hk5hu31tyhy3.png](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)

---

<div class="post-metadata">

**Author:** ![someone](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/someone/32/381_2.png) [@someone](https://forums.plex.tv/u/someone)\
**Post date:** [January 12, 2011, 6:41pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/10 "2011-01-12T18:41:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![freedom80](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@freedom80](https://forums.plex.tv/u/freedom80)\
**Post date:** [February 12, 2011, 10:27am UTC](https://forums.plex.tv/t/ofdb-agent/7242/11 "2011-02-12T10:27:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![someone](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/someone/32/381_2.png) [@someone](https://forums.plex.tv/u/someone)\
**Post date:** [February 13, 2011, 5:57pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/12 "2011-02-13T17:57:04Z")

</div>

> [@](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [February 13, 2011, 6:31pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/13 "2011-02-13T18:31:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![someone](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/someone/32/381_2.png) [@someone](https://forums.plex.tv/u/someone)\
**Post date:** [February 13, 2011, 7:28pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/14 "2011-02-13T19:28:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![freedom80](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@freedom80](https://forums.plex.tv/u/freedom80)\
**Post date:** [February 14, 2011, 3:57pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/15 "2011-02-14T15:57:16Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![freedom80](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@freedom80](https://forums.plex.tv/u/freedom80)\
**Post date:** [March 17, 2011, 4:25pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/16 "2011-03-17T16:25:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cypher\_punk](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@cypher\_punk](https://forums.plex.tv/u/cypher_punk)\
**Post date:** [July 31, 2011, 10:10pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/17 "2011-07-31T22:10:30Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Critton](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Critton](https://forums.plex.tv/u/Critton)\
**Post date:** [August 3, 2011, 6:50pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/18 "2011-08-03T18:50:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [August 5, 2011, 3:15pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/19 "2011-08-05T15:15:47Z")

</div>

> [@](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Critton](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Critton](https://forums.plex.tv/u/Critton)\
**Post date:** [August 5, 2011, 3:43pm UTC](https://forums.plex.tv/t/ofdb-agent/7242/20 "2011-08-05T15:43:42Z")

</div>

> [@](#):
>
> 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

[Next page](https://forums.plex.tv/t/ofdb-agent/7242.md?page=2)
