MythTV  master
Classes | Functions | Variables
ttvdb Namespace Reference

Classes

class  Episode
 
class  OutStreamEncoder
 
class  returnAllSeriesUI
 
class  Season
 
class  Show
 
class  Tvdb
 
class  tvdb_account
 

Functions

def _can_int (x)
 
def search_for_series (tvdb, sid_or_name, language)
 
def searchseries (t, opts, series_season_ep)
 
def get_graphics (t, opts, series_season_ep, graphics_type, single_option, language=False)
 
def massageEpisode_name (ep_name, series_season_ep)
 
def change_to_commas (meta_data)
 
def change_amp (text)
 
def make_db_ready (text)
 
def Getseries_episode_data (t, opts, series_season_ep, language=None)
 
def Getseries_episode_numbers (t, opts, series_season_ep)
 
def initialize_override_dictionary (useroptions, language)
 
def convert_search_to_xml (t, allSeries)
 
def convert_series_to_xml (t, series_season_ep, ep_info)
 
def initializeXslt (language)
 
def displaySearchXML (tvdb_api)
 
def displaySeriesXML (tvdb_api, series_season_ep)
 
def displayCollectionXML (tvdb_api)
 
def doc_test (opts)
 
def main ()
 

Variables

string __title__ = "TheTVDB.com";
 
string __author__ = "R.D.Vaughan"
 
string __version__ = "2.0.0"
 
string usage_txt
 
int IS_PY2 = 2
 
 stdio_type = file
 
 unicode = str
 
string version = ''
 
string http_find = "http://www.thetvdb.com"
 
string http_replace = "http://www.thetvdb.com"
 
list name_parse
 
dictionary massage = {'writer':'|','director':'|', 'overview':'&', 'gueststars':'|' }
 
list data_keys = ['airedSeason','airedEpisodeNumber','episodeName','firstAired','directors','overview','rating','writers','filename','language' ]
 
list data_titles = ['Season:','Episode:','Subtitle:','ReleaseDate:','Director:','Plot:','UserRating:','Writers:','Screenshot:','Language:' ]
 
string fanart_key = 'fanart'
 
string banner_key = 'series'
 
string poster_key = 'poster'
 
string season_key = 'season'
 
string poster_series_key = '680x1000'
 
string poster_season_key = 'season'
 
string fanart_hires_key = '1920x1080'
 
string fanart_lowres_key = '1280x720'
 
string banner_series_key = 'graphical'
 
string banner_season_key = 'seasonwide'
 
string poster_type = 'Poster'
 
string fanart_type = 'Fanart'
 
string banner_type = 'Banner'
 
bool screenshot_request = False
 
 confdir = os.environ.get('MYTHCONFDIR', '')
 
 cache_dir = os.path.join(confdir, "cache/tvdb_api/")
 
 stdout
 
 stderr
 

Function Documentation

◆ _can_int()

def ttvdb._can_int (   x)
private
Takes a string, checks if it is numeric.
>>> _can_int("2")
True
>>> _can_int("A test")
False

Definition at line 1388 of file ttvdb.py.

Referenced by main().

◆ search_for_series()

def ttvdb.search_for_series (   tvdb,
  sid_or_name,
  language 
)

Definition at line 1510 of file ttvdb.py.

Referenced by Getseries_episode_data(), Getseries_episode_numbers(), main(), and searchseries().

◆ searchseries()

def ttvdb.searchseries (   t,
  opts,
  series_season_ep 
)

Definition at line 1519 of file ttvdb.py.

Referenced by main().

◆ get_graphics()

def ttvdb.get_graphics (   t,
  opts,
  series_season_ep,
  graphics_type,
  single_option,
  language = False 
)

Definition at line 1572 of file ttvdb.py.

Referenced by main().

◆ massageEpisode_name()

def ttvdb.massageEpisode_name (   ep_name,
  series_season_ep 
)

Definition at line 1677 of file ttvdb.py.

Referenced by Getseries_episode_numbers().

◆ change_to_commas()

def ttvdb.change_to_commas (   meta_data)

Definition at line 1684 of file ttvdb.py.

Referenced by Getseries_episode_data().

◆ change_amp()

def ttvdb.change_amp (   text)

Definition at line 1691 of file ttvdb.py.

Referenced by Getseries_episode_data().

◆ make_db_ready()

def ttvdb.make_db_ready (   text)

Definition at line 1702 of file ttvdb.py.

◆ Getseries_episode_data()

def ttvdb.Getseries_episode_data (   t,
  opts,
  series_season_ep,
  language = None 
)

Definition at line 1716 of file ttvdb.py.

Referenced by main().

◆ Getseries_episode_numbers()

def ttvdb.Getseries_episode_numbers (   t,
  opts,
  series_season_ep 
)

Definition at line 1874 of file ttvdb.py.

Referenced by main().

◆ initialize_override_dictionary()

def ttvdb.initialize_override_dictionary (   useroptions,
  language 
)
Change variables through a user supplied configuration file
return False and exit the script if there are issues with the configuration file values

Definition at line 1938 of file ttvdb.py.

Referenced by main().

◆ convert_search_to_xml()

def ttvdb.convert_search_to_xml (   t,
  allSeries 
)
Convert json to xml and set up tvdb_api object as other stuff expects
:param t:   tvdb_api object
:param allSeries: json array of series
:return: xml version of allseries

Definition at line 2021 of file ttvdb.py.

Referenced by main().

◆ convert_series_to_xml()

def ttvdb.convert_series_to_xml (   t,
  series_season_ep,
  ep_info 
)
Convert json to xml and set up tvdb_api object as other stuff expects
:param t:   tvdb_api object
:param ep_info: json array of series

Definition at line 2042 of file ttvdb.py.

Referenced by Getseries_episode_numbers(), and main().

◆ initializeXslt()

def ttvdb.initializeXslt (   language)
Initalize all data and functions for XSLT stylesheet processing
return nothing

Definition at line 2081 of file ttvdb.py.

Referenced by main().

◆ displaySearchXML()

def ttvdb.displaySearchXML (   tvdb_api)
Using a XSLT style sheet translate TVDB search results into the MythTV Universal Query format
return nothing

Definition at line 2103 of file ttvdb.py.

Referenced by main().

◆ displaySeriesXML()

def ttvdb.displaySeriesXML (   tvdb_api,
  series_season_ep 
)
Using a XSLT style sheet translate TVDB Series data results into the
MythTV Universal Query format
return nothing

Definition at line 2128 of file ttvdb.py.

Referenced by Getseries_episode_numbers(), and main().

◆ displayCollectionXML()

def ttvdb.displayCollectionXML (   tvdb_api)
Using a XSLT style sheet translate TVDB series results into the MythTV Universal Query format
return nothing

Definition at line 2153 of file ttvdb.py.

Referenced by main().

◆ doc_test()

def ttvdb.doc_test (   opts)

Definition at line 2179 of file ttvdb.py.

Referenced by main().

◆ main()

def ttvdb.main ( void  )

Definition at line 2208 of file ttvdb.py.

Variable Documentation

◆ __title__

string ttvdb.__title__ = "TheTVDB.com";
private

Definition at line 891 of file ttvdb.py.

◆ __author__

string ttvdb.__author__ = "R.D.Vaughan"
private

Definition at line 892 of file ttvdb.py.

◆ __version__

string ttvdb.__version__ = "2.0.0"
private

Definition at line 893 of file ttvdb.py.

◆ usage_txt

string ttvdb.usage_txt

Definition at line 996 of file ttvdb.py.

◆ IS_PY2

int ttvdb.IS_PY2 = 2

Definition at line 1245 of file ttvdb.py.

◆ stdio_type

ttvdb.stdio_type = file

Definition at line 1305 of file ttvdb.py.

◆ unicode

ttvdb.unicode = str

◆ version

string ttvdb.version = ''

Definition at line 1319 of file ttvdb.py.

◆ http_find

string ttvdb.http_find = "http://www.thetvdb.com"

Definition at line 1332 of file ttvdb.py.

◆ http_replace

string ttvdb.http_replace = "http://www.thetvdb.com"

Definition at line 1333 of file ttvdb.py.

◆ name_parse

list ttvdb.name_parse
Initial value:
1 = [
2  # foo_[s01]_[e01]
3  re.compile(),
4  # foo.1x09*
5  re.compile(),
6  # foo.s01.e01, foo.s01_e01
7  re.compile(),
8  # foo.103*
9  re.compile(),
10  # foo.0103*
11  re.compile(),
12 ]

Definition at line 1335 of file ttvdb.py.

◆ massage

dictionary ttvdb.massage = {'writer':'|','director':'|', 'overview':'&', 'gueststars':'|' }

Definition at line 1349 of file ttvdb.py.

◆ data_keys

list ttvdb.data_keys = ['airedSeason','airedEpisodeNumber','episodeName','firstAired','directors','overview','rating','writers','filename','language' ]

Definition at line 1351 of file ttvdb.py.

◆ data_titles

list ttvdb.data_titles = ['Season:','Episode:','Subtitle:','ReleaseDate:','Director:','Plot:','UserRating:','Writers:','Screenshot:','Language:' ]

Definition at line 1352 of file ttvdb.py.

◆ fanart_key

string ttvdb.fanart_key = 'fanart'

Definition at line 1354 of file ttvdb.py.

◆ banner_key

string ttvdb.banner_key = 'series'

Definition at line 1355 of file ttvdb.py.

◆ poster_key

string ttvdb.poster_key = 'poster'

Definition at line 1356 of file ttvdb.py.

◆ season_key

string ttvdb.season_key = 'season'

Definition at line 1357 of file ttvdb.py.

◆ poster_series_key

string ttvdb.poster_series_key = '680x1000'

Definition at line 1359 of file ttvdb.py.

◆ poster_season_key

string ttvdb.poster_season_key = 'season'

Definition at line 1360 of file ttvdb.py.

◆ fanart_hires_key

string ttvdb.fanart_hires_key = '1920x1080'

Definition at line 1361 of file ttvdb.py.

◆ fanart_lowres_key

string ttvdb.fanart_lowres_key = '1280x720'

Definition at line 1362 of file ttvdb.py.

◆ banner_series_key

string ttvdb.banner_series_key = 'graphical'

Definition at line 1363 of file ttvdb.py.

◆ banner_season_key

string ttvdb.banner_season_key = 'seasonwide'

Definition at line 1364 of file ttvdb.py.

◆ poster_type

string ttvdb.poster_type = 'Poster'

Definition at line 1366 of file ttvdb.py.

◆ fanart_type

string ttvdb.fanart_type = 'Fanart'

Definition at line 1367 of file ttvdb.py.

◆ banner_type

string ttvdb.banner_type = 'Banner'

Definition at line 1368 of file ttvdb.py.

◆ screenshot_request

bool ttvdb.screenshot_request = False

Definition at line 1369 of file ttvdb.py.

◆ confdir

ttvdb.confdir = os.environ.get('MYTHCONFDIR', '')

Definition at line 1372 of file ttvdb.py.

◆ cache_dir

ttvdb.cache_dir = os.path.join(confdir, "cache/tvdb_api/")

Definition at line 1382 of file ttvdb.py.

◆ stdout

ttvdb.stdout

Definition at line 1425 of file ttvdb.py.

◆ stderr

ttvdb.stderr