[mythtv-firehose] mythtv/utc commit: 094608c99 by Raymond Wagner (wagnerrp)
MythTV
noreply at mythtv.org
Tue Mar 27 20:18:19 UTC 2012
Author: Raymond Wagner <rwagner at mythtv.org>
Change Date: 2012-03-26T07:06:14-07:00
Push Date: 2012/03/27 13:17:48 -0700
Repository: mythtv
Branch: utc
New Revision: 094608c9954d30ceaed084d228ad99ad971bfe47
Changeset: https://github.com/MythTV/mythtv/commit/094608c99
Log:
Finish up locale and fallthough.
This completes the transition from language to locale support from the
previous several commits. All search and data classes now accept a
Locale class as a keyword. If none is provided, they will instead use
the global default. Access and configuration of locales is provided
through the get_locale() and set_locale() functions.
set_locale(language=None, country=None, fallthrough=False)
This sets the global default, as well as the global fall through
behavior. If no language or country is given, and no previous
configuration is set, it will attempt to pull the system's locale
from the environment.
get_locale(language=None, country=None)
This returns a new Locale class to use directly in a search or data
query. This will be automatically propogated through any additional
objects spawned by the search or query.
Fallthrough
If a language or country is specified for use by an API query,
fallthrough is enabled, and there are missing or None fields, this
will automatically run a second query with the language or country
information removed, in an attempt to fill those missing fields.
Fallthrough is not used for searches, however it will be used to
supplement any information for results returned by those searches.
Fallthrough is a global option, so while you can specify a specific
locale to use for a line of queries, fallthrough will either be
enabled for all or none.
Modified:
tmdb3/request.py
tmdb3/tmdb_api.py
tmdb3/util.py
More information about the mythtv-firehose
mailing list