本文整理匯總了Python中resources.lib.TheMovieDB.extended_movie_info方法的典型用法代碼示例。如果您正苦於以下問題:Python TheMovieDB.extended_movie_info方法的具體用法?Python TheMovieDB.extended_movie_info怎麽用?Python TheMovieDB.extended_movie_info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類resources.lib.TheMovieDB
的用法示例。
在下文中一共展示了TheMovieDB.extended_movie_info方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: movie_context_menu
# 需要導入模塊: from resources.lib import TheMovieDB [as 別名]
# 或者: from resources.lib.TheMovieDB import extended_movie_info [as 別名]
def movie_context_menu(self, control_id):
movie_id = self.FocusedItem(control_id).getProperty("id")
dbid = self.FocusedItem(control_id).getVideoInfoTag().getDbId()
options = [addon.LANG(32113)]
if self.logged_in:
options.append(addon.LANG(32083))
selection = xbmcgui.Dialog().contextmenu(list=options)
if selection == 0:
rating = utils.input_userrating()
tmdb.set_rating(media_type="movie",
media_id=movie_id,
rating=rating,
dbid=dbid)
xbmc.sleep(2000)
tmdb.extended_movie_info(movie_id=movie_id,
dbid=dbid,
cache_time=0)
elif selection == 1:
account_lists = tmdb.get_account_lists()
if not account_lists:
return False
listitems = ["%s (%i)" % (i["name"], i["item_count"]) for i in account_lists]
i = xbmcgui.Dialog().select(addon.LANG(32136), listitems)
if i > -1:
tmdb.change_list_status(list_id=account_lists[i]["id"],
movie_id=movie_id,
status=True)
示例2: __init__
# 需要導入模塊: from resources.lib import TheMovieDB [as 別名]
# 或者: from resources.lib.TheMovieDB import extended_movie_info [as 別名]
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
示例3: update_states
# 需要導入模塊: from resources.lib import TheMovieDB [as 別名]
# 或者: from resources.lib.TheMovieDB import extended_movie_info [as 別名]
def update_states(self):
xbmc.sleep(2000) # delay because MovieDB takes some time to update
_, __, self.states = tmdb.extended_movie_info(movie_id=self.info.get_property("id"),
dbid=self.dbid,
cache_time=0)
super(DialogMovieInfo, self).update_states()