def search_ondemand_programmes():
    kb = xbmc.Keyboard()
    kb.setHeading("Cerca un programma")
    kb.doModal()
    if kb.isConfirmed():
        try:
            name = kb.getText().decode('utf8').lower()
        except:
            name = kb.getText().lower()
        xbmc.log("Searching for programme: " + name)
        raiplay = RaiPlay()
        dir = raiplay.getProgrammeList(raiplay.AzTvShowPath)
        for letter in dir:
            for item in dir[letter]:
                if item["name"].lower().find(name) != -1:
                    liStyle = xbmcgui.ListItem(
                        item["name"],
                        thumbnailImage=raiplay.getThumbnailUrl(
                            item["images"]["landscape"]))
                    addDirectoryItem(
                        {
                            "mode": "ondemand",
                            "path_id": item["PathID"],
                            "sub_type": "PLR programma Page"
                        }, liStyle)
        xbmcplugin.addSortMethod(handle, xbmcplugin.SORT_METHOD_LABEL)
        xbmcplugin.endOfDirectory(handle=handle, succeeded=True)
示例#2
0
def show_ondemand_index(index, pathId):
    xbmc.log("PathID: " + pathId)
    xbmc.log("Index: " + index)
    raiplay = RaiPlay()
    dir = raiplay.getProgrammeList(pathId)
    for item in dir[index]:
        liStyle = xbmcgui.ListItem(item["name"], thumbnailImage=raiplay.getThumbnailUrl(item["images"]["landscape"]))
        addDirectoryItem({"mode": "ondemand", "path_id": item["PathID"], "sub_type": "PLR programma Page"}, liStyle)
    xbmcplugin.addSortMethod(handle, xbmcplugin.SORT_METHOD_LABEL)
    xbmcplugin.endOfDirectory(handle=handle, succeeded=True)
示例#3
0
def show_ondemand_index(index, pathId):
    xbmc.log("Raiplay.show_ondemand_index with index %s and PathID: %s" % (index, pathId) )

    raiplay = RaiPlay(Addon)
    dir = raiplay.getProgrammeList(pathId)
    for item in dir[index]:
        liStyle = xbmcgui.ListItem(item["name"])
        liStyle.setThumbnailImage(raiplay.getThumbnailUrl(item["images"]["landscape"]))
        addDirectoryItem({"mode": "ondemand", "path_id": item["path_id"], "sub_type": item["type"]}, liStyle)
    xbmcplugin.addSortMethod(handle, xbmcplugin.SORT_METHOD_LABEL)
    xbmcplugin.endOfDirectory(handle=handle, succeeded=True)
示例#4
0
def show_ondemand_index(index, pathId):
    xbmc.log("PathID: " + pathId)
    xbmc.log("Index: " + index)
    raiplay = RaiPlay()
    dir = raiplay.getProgrammeList(raiplay.baseUrl + pathId.replace(" ", "%20"))
    for item in dir[index]:
        liStyle = xbmcgui.ListItem(item["name"], thumbnailImage=item["images"]["landscape"].replace("[RESOLUTION]", "256x-"))
        #xbmc.log(item["images"]["landscape"].replace("[RESOLUTION]", "256x-"))
        addDirectoryItem({"mode": "ondemand", "path_id": item["PathID"], "sub_type": "PLR programma Page"}, liStyle)
    xbmcplugin.addSortMethod(handle, xbmcplugin.SORT_METHOD_LABEL)
    xbmcplugin.endOfDirectory(handle=handle, succeeded=True)
示例#5
0
def search_ondemand_programmes():
    kb = xbmc.Keyboard()
    kb.setHeading("Cerca un programma")
    kb.doModal()
    if kb.isConfirmed():
        name = kb.getText().decode('utf8')
        xbmc.log("Searching for programme: " + name)
        raiplay = RaiPlay()
        dir = raiplay.getProgrammeList(raiplay.baseUrl + raiplay.AzTvShowPath)
        for letter in dir:
            for item in dir[letter]:
                if item["name"].lower().find(name) != -1:
                    liStyle = xbmcgui.ListItem(item["name"], thumbnailImage=item["images"]["landscape"].replace("[RESOLUTION]", "256x-"))
                    addDirectoryItem({"mode": "ondemand", "path_id": item["PathID"], "sub_type": "PLR programma Page"}, liStyle)
        xbmcplugin.addSortMethod(handle, xbmcplugin.SORT_METHOD_LABEL)
        xbmcplugin.endOfDirectory(handle=handle, succeeded=True)
示例#6
0
def show_ondemand_index_all(index, pathId):
    xbmc.log(
        "Raiplay.show_ondemand_index_all with index from 0 to %sS and PathID: %s"
        % (index, pathId))
    raiplay = RaiPlay(Addon)
    dir = raiplay.getProgrammeList(pathId)
    dictKeys = dir.keys()
    for currKey in dictKeys:
        for item in dir[currKey]:
            liStyle = xbmcgui.ListItem(item["name"])
            liStyle.setArt({
                "thumb":
                raiplay.getThumbnailUrl(item["images"]["landscape"])
            })
            addDirectoryItem(
                {
                    "mode": "ondemand",
                    "path_id": item["path_id"],
                    "sub_type": item["type"]
                }, liStyle)
    xbmcplugin.addSortMethod(handle, xbmcplugin.SORT_METHOD_LABEL)
    xbmcplugin.endOfDirectory(handle=handle, succeeded=True)