def open_actor_info(self, prev_window=None, actor_id=None, name=None): """ open actor info, deal with window stack """ from dialogs import DialogActorInfo from TheMovieDB import get_person_info if not actor_id: name = name.decode("utf-8").split(" " + LANG(20347) + " ") names = name[0].strip().split(" / ") if len(names) > 1: ret = xbmcgui.Dialog().select(heading=LANG(32027), list=names) if ret == -1: return None name = names[ret] else: name = names[0] xbmc.executebuiltin("ActivateWindow(busydialog)") actor_info = get_person_info(name) if actor_info: actor_id = actor_info["id"] else: xbmc.executebuiltin("ActivateWindow(busydialog)") actor_class = DialogActorInfo.get_actor_window(WindowXML if SETTING("window_mode") == "true" else DialogXML) dialog = actor_class(ACTOR_DIALOG_FILE, ADDON_PATH, id=actor_id) xbmc.executebuiltin("Dialog.Close(busydialog)") self.open_dialog(dialog, prev_window)
def open_actor_info(self, prev_window=None, actor_id=None, name=None): """ open actor info, deal with window stack """ from dialogs import DialogActorInfo if not actor_id: name = name.split(" " + addon.LANG(20347) + " ") names = name[0].strip().split(" / ") if len(names) > 1: ret = xbmcgui.Dialog().select(heading=addon.LANG(32027), list=names) if ret == -1: return None name = names[ret] else: name = names[0] self.show_busy() actor_info = TheMovieDB.get_person_info(name) if actor_info: actor_id = actor_info["id"] else: return None else: self.show_busy() actor_class = DialogActorInfo.get_window(windows.DialogXML) dialog = actor_class(ACTOR_XML, addon.PATH, id=actor_id) self.hide_busy() self.open_dialog(dialog, prev_window)
def open_actor_info(self, prev_window=None, actor_id=None, name=None): """ open actor info, deal with window stack """ from dialogs import DialogActorInfo if not actor_id: name = name.split(" " + LANG(20347) + " ") names = name[0].strip().split(" / ") if len(names) > 1: ret = xbmcgui.Dialog().select(heading=LANG(32027), list=names) if ret == -1: return None name = names[ret] else: name = names[0] xbmc.executebuiltin("ActivateWindow(busydialog)") actor_info = TheMovieDB.get_person_info(name) if actor_info: actor_id = actor_info["id"] else: return None else: xbmc.executebuiltin("ActivateWindow(busydialog)") actor_class = DialogActorInfo.get_window(self.window_type) dialog = actor_class(ACTOR_DIALOG_FILE, ADDON_PATH, id=actor_id) xbmc.executebuiltin("Dialog.Close(busydialog)") self.open_dialog(dialog, prev_window)