Opened 6 years ago

Closed 6 years ago

#10240 closed Patch - Feature (Fixed)

Get locale-specific certiciates for movie metadata

Reported by: mythtv@… Owned by: stuartm
Priority: minor Milestone: 0.27
Component: MythTV - Mythmetadatalookup Version: Master Head
Severity: low Keywords:
Cc: Ticket locked: no

Description

TMDB supports localised movie certificates by modifying the language parameter passed to the script to include the 2-character country code

e.g. cjo20@ubuntu:~/mythsrc/mythtv$ /usr/local/share/mythtv/metadata/Movie/tmdb.py -l en -D 170 | grep certi

<certifications>

<certification locale="us" name="R"/>

</certifications>

cjo20@ubuntu:~/mythsrc/mythtv$ /usr/local/share/mythtv/metadata/Movie/tmdb.py -l en-GB -D 170 | grep certi

<certifications>

<certification locale="us" name="18"/>

</certifications>

Attachments (2)

metadata_locale.patch (866 bytes) - added by mythtv@… 6 years ago.
Patch to add locale to metadata lookup
metadatalangugage.patch (6.6 KB) - added by mythtv@… 6 years ago.
Updated to add option to all metadata grabbers

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by mythtv@…

Attachment: metadata_locale.patch added

Patch to add locale to metadata lookup

comment:1 Changed 6 years ago by robertm

Status: newinfoneeded_new

All metadata scripts need to behave according to the same standard, meaning the addition of locale to the command line options needs to also work with Television scripts. I can live with adding locale as a metadata script argument (in fact, it's tough to avoid it) but the other script in our repository (ttvdb.py) needs to be patched to at least accept the argument so that script behavior is standard. As it is right now, passing the locale in this manner to the ttvdb.py script breaks returns in the language (ie, -l de returns german results, -l de-de returns english results).

If you want to patch ttvdb.py so that it will accept and disregard the locale, I will see about applying the patch. Also, if they can all be patched to take an underscore rather than a dash (en_gb) then I'll feel better too, since that's the more standard notation as far as I know.

comment:2 Changed 6 years ago by mythtv@…

So would a modification so that each script takes a -c <country_code> argument be sufficient, allowing the TMDB script to concatenate the -l and -c options, and the TTDB script to just ignore the option?

comment:3 Changed 6 years ago by robertm

Yes, this is fine too-- how the script handles the arguments internally isn't of concern to me, only that the script behaviors and the arguments passed be the same.

Thanks!

Changed 6 years ago by mythtv@…

Attachment: metadatalangugage.patch added

Updated to add option to all metadata grabbers

comment:4 Changed 6 years ago by mythtv@…

Updated patch to make script behavior consistent, as requested.

comment:5 Changed 6 years ago by stuartm

Milestone: unknown0.26
Owner: changed from robertm to stuartm
Status: infoneeded_newassigned
Version: UnspecifiedMaster Head

comment:6 Changed 6 years ago by Kenni Lund [kenni a kelu dot dk]

Milestone: 0.260.27

comment:7 Changed 6 years ago by Chris Oattes <mythtv@…>

In f620f2f83607bb5c4c576a476646fec6164ca155/mythtv:

Add locale arg to all metadata grabber to facilite grabbing locale specific information. Refs #10240

Signed-off-by: Stuart Morgan <smorgan@…>

comment:8 Changed 6 years ago by stuartm

Resolution: Fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.