def __init__(self, *args, **kwargs):
     super(DialogMovieInfo, self).__init__(*args, **kwargs)
     data = tmdb.extended_movie_info(movie_id=kwargs.get('id'),
                                     dbid=kwargs.get('dbid'))
     if not data:
         return None
     self.info, self.lists, self.states = data
     sets_thread = SetItemsThread(self.info.get_property("set_id"))
     self.omdb_thread = utils.FunctionThread(
         function=omdb.get_movie_info,
         param=self.info.get_property("imdb_id"))
     self.omdb_thread.start()
     sets_thread.start()
     self.info.update_properties(imagetools.blur(
         self.info.get_art("thumb")))
     if not self.info.get_info("dbid"):
         self.info.set_art("poster",
                           utils.get_file(self.info.get_art("poster")))
     sets_thread.join()
     self.info.update_properties(
         {"set.%s" % k: v
          for k, v in list(sets_thread.setinfo.items())})
     set_ids = [item.get_property("id") for item in sets_thread.listitems]
     self.lists["similar"] = [
         i for i in self.lists["similar"]
         if i.get_property("id") not in set_ids
     ]
     self.lists["sets"] = sets_thread.listitems
 def __init__(self, *args, **kwargs):
     super(DialogTVShowInfo, self).__init__(*args, **kwargs)
     data = tmdb.extended_tvshow_info(tvshow_id=kwargs.get('tmdb_id', False),
                                      dbid=self.dbid)
     if not data:
         return None
     self.info, self.lists, self.states = data
     if not self.info.get_info("dbid"):
         self.info.set_art("poster", utils.get_file(self.info.get_art("poster")))
     self.info.update_properties(imagetools.blur(self.info.get_art("poster")))
Exemplo n.º 3
0
 def __init__(self, *args, **kwargs):
     super(DialogTVShowInfo, self).__init__(*args, **kwargs)
     data = tmdb.extended_tvshow_info(tvshow_id=kwargs.get('tmdb_id'),
                                      dbid=kwargs.get('dbid'))
     if not data:
         return None
     self.info, self.lists, self.states = data
     if not self.info.get_info("dbid"):
         self.info.set_art("poster", utils.get_file(self.info.get_art("poster")))
     self.info.update_properties(imagetools.blur(self.info.get_art("poster")))
 def __init__(self, *args, **kwargs):
     super(DialogSeasonInfo, self).__init__(*args, **kwargs)
     self.tvshow_id = kwargs.get('id')
     data = tmdb.extended_season_info(tvshow_id=self.tvshow_id,
                                      season_number=kwargs.get('season'))
     if not data:
         return None
     self.info, self.lists = data
     if not self.info.get_info("dbid"):  # need to add comparing for seasons
         poster = utils.get_file(url=self.info.get_art("poster"))
         self.info.set_art("poster", poster)
     self.info.update_properties(imagetools.blur(self.info.get_art("poster")))
Exemplo n.º 5
0
 def __init__(self, *args, **kwargs):
     super(DialogSeasonInfo, self).__init__(*args, **kwargs)
     self.tvshow_id = kwargs.get('id')
     data = tmdb.extended_season_info(tvshow_id=self.tvshow_id,
                                      season_number=kwargs.get('season'))
     if not data:
         return None
     self.info, self.lists = data
     if not self.info.get_info("dbid"):  # need to add comparing for seasons
         poster = utils.get_file(url=self.info.get_art("poster"))
         self.info.set_art("poster", poster)
     self.info.update_properties(
         imagetools.blur(self.info.get_art("poster")))
Exemplo n.º 6
0
 def __init__(self, *args, **kwargs):
     super(DialogMovieInfo, self).__init__(*args, **kwargs)
     data = tmdb.extended_movie_info(movie_id=kwargs.get('id'),
                                     dbid=kwargs.get('dbid'))
     if not data:
         return None
     self.info, self.lists, self.states = data
     sets_thread = SetItemsThread(self.info.get_property("set_id"))
     self.omdb_thread = utils.FunctionThread(function=omdb.get_movie_info,
                                             param=self.info.get_property("imdb_id"))
     self.omdb_thread.start()
     sets_thread.start()
     self.info.update_properties(imagetools.blur(self.info.get_art("thumb")))
     if not self.info.get_info("dbid"):
         self.info.set_art("poster", utils.get_file(self.info.get_art("poster")))
     sets_thread.join()
     self.info.update_properties({"set.%s" % k: v for k, v in sets_thread.setinfo.iteritems()})
     set_ids = [item.get_property("id") for item in sets_thread.listitems]
     self.lists["similar"] = [i for i in self.lists["similar"] if i.get_property("id") not in set_ids]
     self.lists["sets"] = sets_thread.listitems