'interactive (True/False):
When True, uses built-in console UI is used to select the correct show.
When False, the first search result is used.
select_first (True/False):
Automatically selects the first series search result (rather
than showing the user a list of more than one series).
Is overridden by interactive = False, or specifying a custom_ui
debug (True/False) DEPRECATED:
Replaced with proper use of logging module. To show debug messages:
>>> import logging
>>> logging.basicConfig(level = logging.DEBUG)
cache (True/False/str/unicode/urllib2 opener):
Retrieved XML are persisted to to disc. If true, stores in
tvdb_api folder under your systems TEMP_DIR, if set to
str/unicode instance it will use this as the cache
location. If False, disables caching.  Can also be passed
an arbitrary Python object, which is used as a urllib2
opener, which should be created by urllib2.build_opener
banners (True/False):
Retrieves the banners for a show. These are accessed
via the _banners key of a Show(), for example:
>>> Tvdb(banners=True)[\'scrubs\'][\'_banners\'].keys()
[\'fanart\', \'poster\', \'series\', \'season\']
actors (True/False):
Retrieves a list of the actors for a show. These are accessed
via the _actors key of a Show(), for example:
>>> t = Tvdb(actors=True)
>>> t[\'scrubs\'][\'_actors\'][0][\'name\']
u\'Zach Braff\'
custom_ui (tvdb_ui.BaseUI subclass):
A callable subclass of tvdb_ui.BaseUI (overrides interactive option)
language (2 character language abbreviation):
The language of the returned data. Is also the language search
uses. Default is "en" (English). For full list, run..
>>> Tvdb().config[\'valid_languages\'] #doctest: +ELLIPSIS
[\'da\', \'fi\', \'nl\', ...]
search_all_languages (True/False):
By default, Tvdb will only search in the language specified using
the language option. When this is True, it will search for the
show in and language
apikey (str/unicode):
Override the default thetvdb.com API key. By default it will use
tvdb_api\'s own key (fine for small scripts), but you can use your
own key if desired - this is recommended if you are embedding
tvdb_api in a larger application)
See http://thetvdb.com/?tab=apiregister to get your own key
forceConnect (bool):
If true it will always try to connect to theTVDB.com even if we
recently timed out. By default it will wait one minute before
trying again, and any requests within that one minute window will
return an exception immediately.
useZip (bool):
Download the zip archive where possibale, instead of the xml.
This is only used when all episodes are pulled.
And only the main language xml is used, the actor and banner xml are lost.'

def __init__(self, interactive=False, select_first=False, debug=False, cache=True, banners=False, actors=False, custom_ui=None, language=None, search_all_languages=False, apikey=None, forceConnect=False, useZip=False, dvdorder=False, proxy=None):

    self.shows = ShowContainer()
    self.corrections = {}
    self.config = {}
    if (apikey is not None):
        self.config['apikey'] = apikey
    else:
        self.config['apikey'] = '0629B785CE550C8D'
    self.config['debug_enabled'] = debug
    self.config['custom_ui'] = custom_ui
    self.config['interactive'] = interactive
    self.config['select_first'] = select_first
    self.config['search_all_languages'] = search_all_languages
    self.config['useZip'] = useZip
    self.config['dvdorder'] = dvdorder
    self.config['proxy'] = proxy
    if (cache is True):
        self.config['cache_enabled'] = True
        self.config['cache_location'] = self._getTempDir()
    elif (cache is False):
        self.config['cache_enabled'] = False
    elif isinstance(cache, basestring):
        self.config['cache_enabled'] = True
        self.config['cache_location'] = cache
    else:
        raise ValueError(('Invalid    value    for    Cache    %r    (type    was    %s)' % (cache, type(cache))))
    self.config['session'] = requests.Session()
    self.config['banners_enabled'] = banners
    self.config['actors_enabled'] = actors
    if self.config['debug_enabled']:
        warnings.warn('The    debug    argument    to    tvdb_api.__init__    will    be    removed    in    the    next    version.    To    enable    debug    messages,    use    the    following    code    before    importing:    import    logging;    logging.basicConfig(level=logging.DEBUG)')
        logging.basicConfig(level=logging.DEBUG)
    self.config['valid_languages'] = ['da', 'fi', 'nl', 'de', 'it', 'es', 'fr', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'zh', 'cs', 'sl', 'hr', 'ko', 'en', 'sv', 'no']
    self.config['langabbv_to_id'] = {'el': 20, 'en': 7, 'zh': 27, 'it': 15, 'cs': 28, 'es': 16, 'ru': 22, 'nl': 13, 'pt': 26, 'no': 9, 'tr': 21, 'pl': 18, 'fr': 17, 'hr': 31, 'de': 14, 'da': 10, 'fi': 11, 'hu': 19, 'ja': 25, 'he': 24, 'ko': 32, 'sv': 8, 'sl': 30}
    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['base_url'] = 'http://thetvdb.com'
    if self.config['search_all_languages']:
        self.config['url_getSeries'] = (u'%(base_url)s/api/GetSeries.php' % self.config)
        self.config['params_getSeries'] = {'seriesname': '', 'language': 'all'}
    else:
        self.config['url_getSeries'] = (u'%(base_url)s/api/GetSeries.php' % self.config)
        self.config['params_getSeries'] = {'seriesname': '', 'language': self.config['language']}
    self.config['url_epInfo'] = (u'%(base_url)s/api/%(apikey)s/series/%%s/all/%%s.xml' % self.config)
    self.config['url_epInfo_zip'] = (u'%(base_url)s/api/%(apikey)s/series/%%s/all/%%s.zip' % self.config)
    self.config['url_seriesInfo'] = (u'%(base_url)s/api/%(apikey)s/series/%%s/%%s.xml' % self.config)
    self.config['url_actorsInfo'] = (u'%(base_url)s/api/%(apikey)s/series/%%s/actors.xml' % self.config)
    self.config['url_seriesBanner'] = (u'%(base_url)s/api/%(apikey)s/series/%%s/banners.xml' % self.config)
    self.config['url_artworkPrefix'] = (u'%(base_url)s/banners/%%s' % self.config)
    self.config['url_updates_all'] = (u'%(base_url)s/api/%(apikey)s/updates_all.zip' % self.config)
    self.config['url_updates_month'] = (u'%(base_url)s/api/%(apikey)s/updates_month.zip' % self.config)
    self.config['url_updates_week'] = (u'%(base_url)s/api/%(apikey)s/updates_week.zip' % self.config)
    self.config['url_updates_day'] = (u'%(base_url)s/api/%(apikey)s/updates_day.zip' % self.config)
