Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
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
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
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