I created a custom version of the themoviedb agent to overcome the location problem to get the correct release dates for specific countries.
I now can get the correct release dates for german movies and normalize the certification field to get uniform entries, e.g. I set “FSK 12” for any answer of “12”, “FSK-12”, “FSK12”…
Works like a charm, but still it seems we are not able to set metadata.original_title or metadata.sort_title.
Am I just naming those fields wrong or are we not supposed to set those via agents?
Looked through the other plug-ins code but can not seem to find a proper solution.
Regards,
blanka
I have such an agent, pending integration by the plex team. the code can be found here : https://github.com/Aqntbghd/TheMovieDB.bundle
I can modify the title from the agent so it should be no problem to you. If you can tell me more about the german classification (and the content of tmdb on that point) i can try to integrate it into the mainstream.
thanks,
Thanks for sharing your code.
There are 5 german ratings for movies called FSK followed by a number which denotes the age the movie is at least appropriate for: FSK 0, FSK 6, FSK 12, FSK 16, FSK 18.
On tmdb however people enter them in different ways since there is no suggestion like for mpaa ratings. So most of the times they just enter the age: 12, some use: FSK-12 or: FSK12 and rarely the preferred way: FSK 12 (like used on de.wikipedia.org).
I use a regular expresion on the certification field that tmdb returns and just look for the numbers and prefix those "FSK ". Still this will fail on cases where tmdb returns, e.g. o.Al. (for no age restriction) which in fact is FSK 0 or sometimes even “-” which can not be distinguished from a missing entry.
In one case I have seen multiple ratings slammed into this field for the movie and the DVD release.
# Content rating.<br />
if lang == 'de':<br />
certReg = re.search("[0-9]+", tmdb_dict['certification'])<br />
if certReg:<br />
certification = "FSK " + certReg.group()<br />
else:<br />
certification = "-"<br />
else:<br />
certification = tmdb_dict['certification']<br />
<br />
metadata.content_rating = certification
Don't forget to import the re module.
Looked through your code, Aqntbghd.
Great work on the location settings to get ratings and release dates from other countries.
Sadly there is no “original title” and “sort title” either. If I remember correctly elan posted about the “sort title” not being able to be set by metadata agents.
I was still wondering about the “original title”.
It is nice though that the sort title strips words like “the” or even “die” in other languages like german automagically, but I’d like it to be set by metadata agents that crawl into collections and set the sort title to “collection title” + [number].
Well, let’s do it plex style and wait for an update. 
Regards,
blanka
Thanks, ok so we will need to put some tweaking in the metadata agent to map this to the correct values (and hopefully map this to the correct pictograms in Plex).
Is the certification linked to a country more than a language ? shouldn't we test for a country instead ?
I have the feeling that this sorting problem is more a client-side problem than server-side one. Is the language/country selection on the PMS propagated to the server (as these modifications are language/country dependant) ?
Yes, you are correct! The certification is linked to country (“DE”) not language.
I hardwired “de” language to the “DE” location… not a good style, but worked for me for a quick fix.
I’m not quite sure about your last question, though. I really dont have any sorting problems. I just want to be able to set this metadata field through the agent. Since this is not a problem at all, forget that I ever asked.
More important… I want to set metadata: “original title” via agent. Since I have german titles for my movies (sometimes they are quite funny) I’d really like to store the original name via agent, too.
At the moment I am manually entering original titles via pmm and thats a real pain.
Regards,
blanka
Hi,
Framework v2 doesn't allow us to set the sort_title yet, but original_title is OK : here is my code
#original_title<br />
cp_originalTitle = updateXMLresult.find('originaltitle')<br />
if cp_originalTitle != None and cp_originalTitle.text != None:<br />
metadata.original_title = cp_originalTitle.text.strip()<br />
Log.Debug("[cine-passion Agent] Adding original title : %s" %(metadata.original_title))
Is there any plans in the future to support setting sort_title? I actually don't want the, an, a extra stripped out
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.