def __init__(self):
     """Initialization and main code run"""
     self.win = xbmcgui.Window(10000)
     self.addon = xbmcaddon.Addon(ADDON_ID)
     self.thetvdb = TheTvDb()
     self.__set_dates()
     action, action_param = self.get_params()
     self.improve_dates = self.addon.getSetting("ImproveDates") == 'true'
     log_msg("MainModule called with action: %s - parameter: %s" % (action, action_param))
     # launch module for action provided by this script
     try:
         getattr(self, action)(action_param)
     except Exception as exc:
         log_exception(__name__, exc)
     finally:
         self.close()
 def __init__(self):
     '''Initialize and load all our helpers'''
     self._studiologos_path = ""
     self.cache = SimpleCache()
     self.addon = xbmcaddon.Addon(ADDON_ID)
     self.kodidb = KodiDb()
     self.omdb = Omdb(self.cache)
     self.tmdb = Tmdb(self.cache)
     self.channellogos = ChannelLogos(self.kodidb)
     self.fanarttv = FanartTv(self.cache)
     self.imdb = Imdb(self.cache)
     self.google = GoogleImages(self.cache)
     self.studiologos = StudioLogos(self.cache)
     self.animatedart = AnimatedArt(self.cache, self.kodidb)
     self.thetvdb = TheTvDb()
     self.musicart = MusicArtwork(self)
     self.pvrart = PvrArtwork(self)
     log_msg("Initialized")
Beispiel #3
0
 def thetvdb(self):
     '''public TheTvDb object - for lazy loading'''
     if not self._thetvdb:
         from thetvdb import TheTvDb
         self._thetvdb = TheTvDb()
     return self._thetvdb
from thetvdb import TheTvDb
from koding import dolog

api_key = '12E8AAC46571E4C1'
tvdb = TheTvDb()

Series_info = []
Seasons = []
Season_number = []
Season_Episodes = []
Season_Episode = []
Episode_ID = []


def get_series_info(ID):
    series_info = tvdb.get_series(ID)
    Series_info.append(series_info)


'''
tvdb.get_series == {'rating': 7, 'art': {'posters': [u'http://thetvdb.com/banners/posters/79412-1.jpg', u'http://thetvdb.com/banners/posters/79412-2.jpg', u'http://thetvdb.com/banners/posters/79412-3.jpg'], 'banner': u'http://thetvdb.com/banners/graphical/79412-g.jpg', 'poster': u'http://thetvdb.com/banners/posters/79412-1.jpg'}, 'airdaytime.short': u'Fri ', 'airdaytime.label': u'Friday  - Network: Tokyo MX', 'plot': u'Ten years after the Holy War in Hong Kong, Mochizuki Jirou, aka the Silver Blade, and the lone hero who fought and defeated the Kowloon Children despite the loss of his lover, returns to Japan with his young brother, Mochizuki Kotaro. The two quickly discover that the Kowloon Children who survived the Holy War are seeking to infiltrate the \u201cSpecial Zone\u201d\u2014a thriving city protected by an invisible barrier that will not allow Kowloon Children entrance\u2014unless they\u2019re invited. Red Bloods refer to the humans; Black Bloods are the vampires, and the Mochizuki Brothers are Old Blood\u2014the last descendants of an elite clan of vampires. When Kotaro is abducted by one of the Kowloon Children, Jirou has no choice but to fight once more.', 'votes': 12, 'network': u'Tokyo MX', 'airdaytime': u'Friday  (Tokyo MX)', 'airtime': '', 'airday': u'Friday', 'status': u'Ended', 'rating.tvdb': 7, 'tvdb_id': 79412, 'imdbnumber': u'tt0878230', 'studio': [u'Tokyo MX'], 'genre': [u'Action', u'Animation', u'Comedy', u'Fantasy'], 'airdaytime.label.short': u'Fri  - Network: Tokyo MX', 'votes.tvdb': 12, 'airday.short': u'Fri', 'title': u'Black Blood Brothers', 'firstaired': u'2006-09-08', 'runtime': 1500}
'''


def get_seasons(ID):
    series_seasons = tvdb.get_series_episodes(ID)
    for results in series_seasons:
        season = results['airedSeason']
        if season not in Seasons:
            Seasons.append(season)
            Season_number.append({'season_number': season})
Beispiel #5
0
debug(sys.argv)
debug("----")
try:
    params = parameters_string_to_dict(sys.argv[2])
    mode = urllib.unquote_plus(params.get('mode', ''))
    series = urllib.unquote_plus(params.get('series', ''))
    season = urllib.unquote_plus(params.get('season', ''))
    debug("Parameter Holen geklappt")
except:
    debug("Parameter Holen nicht geklappt")
    mode = ""
debug("Mode ist : " + mode)
if mode == "":
    title = gettitle()
    lastplayd_title, lastepisode_name, fehlen = get_episodedata(title)
    tvdb = TheTvDb("de-DE")
    wert = tvdb.search_series(title.decode("utf-8"))
    count = 0
    gefunden = 0
    wertnr = 0
    x = 0
    for serie in wert:
        serienname = serie["seriesName"]
        nummer = similar(title, serienname)
        if nummer >= wertnr:
            wertnr = nummer
            gefunden = count
            x = 1
        count += 1
    debug("1. +++suche++" + title)
    debug(wert)