Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 2 years ago

Closed 19 months 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@… 2 years ago.
Patch to add locale to metadata lookup
metadatalangugage.patch (6.6 KB) - added by mythtv@… 2 years ago.
Updated to add option to all metadata grabbers

Download all attachments as: .zip

Change History (10)

Changed 2 years ago by mythtv@…

Patch to add locale to metadata lookup

comment:1 Changed 2 years ago by robertm

  • Status changed from new to infoneeded_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 2 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 2 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 2 years ago by mythtv@…

Updated to add option to all metadata grabbers

comment:4 Changed 2 years ago by mythtv@…

Updated patch to make script behavior consistent, as requested.

comment:5 Changed 2 years ago by stuartm

  • Milestone changed from unknown to 0.26
  • Owner changed from robertm to stuartm
  • Status changed from infoneeded_new to assigned
  • Version changed from Unspecified to Master Head

comment:6 Changed 19 months ago by kenni

  • Milestone changed from 0.26 to 0.27

comment:7 Changed 19 months 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 19 months ago by stuartm

  • Resolution set to Fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.