def searchresults(query, index='0'): index, offset, limit = utils.calculatePaginationValues(index) streams = TWITCHTV.searchStreams(query, offset, limit) items = [CONVERTER.convertStreamToListItem(stream) for stream in streams] items.append(utils.linkToNextPage('searchresults', index, query=query)) utils.refreshPreviews() PLUGIN.set_content(utils.getContentType()) return items
def createListOfGames(index): index, offset, limit = utils.calculatePaginationValues(index) games = TWITCHTV.getGames(offset, limit) items = [CONVERTER.convertGameToListItem(element[Keys.GAME]) for element in games] items.append(utils.linkToNextPage('createListOfGames', index)) PLUGIN.set_content(utils.getContentType()) return items
def createListForGame(gameName, index): index, offset, limit = utils.calculatePaginationValues(index) items = [CONVERTER.convertStreamToListItem(stream) for stream in TWITCHTV.getGameStreams(gameName, offset, limit)] items.append(utils.linkToNextPage('createListForGame', index, gameName=gameName)) utils.refreshPreviews() PLUGIN.set_content(utils.getContentType()) return items