def list_dialog(self, movie_id): busy.show_busy() listitems = [addon.LANG(32139)] account_lists = tmdb.get_account_lists() listitems += [ "%s (%i)" % (i["name"], i["item_count"]) for i in account_lists ] listitems.append(addon.LANG(32138)) busy.hide_busy() index = xbmcgui.Dialog().select(heading=addon.LANG(32136), list=listitems) if index == 0: listname = xbmcgui.Dialog().input(heading=addon.LANG(32137), type=xbmcgui.INPUT_ALPHANUM) if listname: xbmc.sleep(1000) tmdb.change_list_status(list_id=tmdb.create_list(listname), movie_id=movie_id, status=True) elif index == len(listitems) - 1: tmdb.remove_list_dialog(tmdb.handle_lists(account_lists)) elif index > 0: tmdb.change_list_status(list_id=account_lists[index - 1]["id"], movie_id=movie_id, status=True)
def add_to_list_button(self, control_id): busy.show_busy() account_lists = tmdb.get_account_lists() listitems = [ "%s (%i)" % (i["name"], i["item_count"]) for i in account_lists ] listitems.insert(0, addon.LANG(32139)) listitems.append(addon.LANG(32138)) busy.hide_busy() index = xbmcgui.Dialog().select(heading=addon.LANG(32136), list=listitems) if index == 0: listname = xbmcgui.Dialog().input(heading=addon.LANG(32137), type=xbmcgui.INPUT_ALPHANUM) if not listname: return None list_id = tmdb.create_list(listname) xbmc.sleep(1000) tmdb.change_list_status(list_id=list_id, movie_id=self.info.get_property("id"), status=True) elif index == len(listitems) - 1: if tmdb.remove_list_dialog(tmdb.handle_lists(account_lists)): self.update_states() elif index > 0: tmdb.change_list_status(account_lists[index - 1]["id"], self.info.get_property("id"), True) self.update_states()
def add_to_list_button(self, control_id): busy.show_busy() account_lists = tmdb.get_account_lists() listitems = ["%s (%i)" % (i["name"], i["item_count"]) for i in account_lists] listitems.insert(0, addon.LANG(32139)) listitems.append(addon.LANG(32138)) busy.hide_busy() index = xbmcgui.Dialog().select(heading=addon.LANG(32136), list=listitems) if index == 0: listname = xbmcgui.Dialog().input(heading=addon.LANG(32137), type=xbmcgui.INPUT_ALPHANUM) if not listname: return None list_id = tmdb.create_list(listname) xbmc.sleep(1000) tmdb.change_list_status(list_id=list_id, movie_id=self.info.get_property("id"), status=True) elif index == len(listitems) - 1: if tmdb.remove_list_dialog(tmdb.handle_lists(account_lists)): self.update_states() elif index > 0: tmdb.change_list_status(account_lists[index - 1]["id"], self.info.get_property("id"), True) self.update_states()
def list_dialog(self, movie_id): busy.show_busy() listitems = [addon.LANG(32139)] account_lists = tmdb.get_account_lists() listitems += ["%s (%i)" % (i["name"], i["item_count"]) for i in account_lists] listitems.append(addon.LANG(32138)) busy.hide_busy() index = xbmcgui.Dialog().select(heading=addon.LANG(32136), list=listitems) if index == 0: listname = xbmcgui.Dialog().input(heading=addon.LANG(32137), type=xbmcgui.INPUT_ALPHANUM) if listname: xbmc.sleep(1000) tmdb.change_list_status(list_id=tmdb.create_list(listname), movie_id=movie_id, status=True) elif index == len(listitems) - 1: tmdb.remove_list_dialog(tmdb.handle_lists(account_lists)) elif index > 0: tmdb.change_list_status(list_id=account_lists[index - 1]["id"], movie_id=movie_id, status=True)