[mythtv-commits] Ticket #8470: Language support for TMDB

MythTV mythtv at cvs.mythtv.org
Tue May 18 12:20:37 UTC 2010


#8470: Language support for TMDB
-------------------------------+--------------------------------------------
 Reporter:  Lomion             |       Owner:  wagnerrp  
     Type:  enhancement        |      Status:  new       
 Priority:  minor              |   Milestone:  0.23-fixes
Component:  Bindings - Python  |     Version:  0.23-fixes
 Severity:  low                |     Mlocked:  0         
-------------------------------+--------------------------------------------
 The language support was added to the TMDB python script as a dummy
 function but hard-coded to "en" for the time being.

 First testing showed good support for german metadata at least.

 Please advice how to proceed in order to enable multi-language support in
 the TMDB script!

 Index: tmdb_api.py
 ===================================================================
 --- tmdb_api.py (revision 24733)
 +++ tmdb_api.py (working copy)
 @@ -308,17 +308,19 @@
          #    "ru","he","ja","pt","zh","cs","sl", "hr","ko","en","sv","no"
          #]

 -        # ONLY ENGISH is supported at this time
 -        self.config['language'] = "en"
 -        #if language is None:
 -        #    self.config['language'] = "en"
 -        #elif language not in self.config['valid_languages']:
 -        #    raise ValueError("Invalid language %s, options are: %s" % (
 -        #        language, self.config['valid_languages']
 -        #    ))
 -        #else:
 -        #    self.config['language'] = language
 +        self.config['valid_languages'] = ["de"]

 +#        # ONLY ENGISH is supported at this time
 +#        self.config['language'] = "en"
 +        if language is None:
 +            self.config['language'] = "en"
 +        elif language not in self.config['valid_languages']:
 +            raise ValueError("Invalid language %s, options are: %s" % (
 +                language, self.config['valid_languages']
 +            ))
 +        else:
 +            self.config['language'] = language
 +
          # The following url_ configs are based of the
          # http://api.themoviedb.org/2.1/
          self.config['base_url'] = "http://api.themoviedb.org/2.1"

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/8470>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list