예제 #1
0
def show_root_folder():
    ansa = Ansa()
    items = ansa.getChannels()

    for item in items:
        liStyle=xbmcgui.ListItem(item["title"])
        addDirectoryItem({"url": item["url"]}, liStyle)
    xbmcplugin.endOfDirectory(handle=handle, succeeded=True)
예제 #2
0
def show_video_files(url):
    ansa = Ansa()
    items = ansa.getVideoByChannel(url)
    for item in items:
        title = item["title"] + " (" + time.strftime("%d/%m/%Y %H:%M", item["date"]) + ")"
        liStyle=xbmcgui.ListItem(title, thumbnailImage=item["thumb"])
        liStyle.setInfo(type="video",
            infoLabels={"Title": title
                        })
        addLinkItem(item["url"], liStyle)
    xbmcplugin.endOfDirectory(handle=handle, succeeded=True)