Ejemplo n.º 1
0
def video(video_id, series_id):
    xbmc.Player().stop()
    player = LogiPlayer()
    if player.has_valid_browser():
        player.play(video_id, series_id)
    listitem = xbmcgui.ListItem(path=generic_utility.addon_dir() + '/resources/fakeVid.mp4')
    xbmcplugin.setResolvedUrl(plugin_handle, True, listitem)
    xbmc.PlayList(xbmc.PLAYLIST_VIDEO).clear()
    if player.has_valid_browser():
        player.doModal()
    return None
Ejemplo n.º 2
0
def video(video_id, series_id):
    xbmc.Player().stop()
    player = LogiPlayer()
    if player.has_valid_browser():
        player.play(video_id, series_id)
    listitem = xbmcgui.ListItem(path=generic_utility.addon_dir() +
                                '/resources/fakeVid.mp4')
    xbmcplugin.setResolvedUrl(plugin_handle, True, listitem)
    xbmc.PlayList(xbmc.PLAYLIST_VIDEO).clear()
    if player.has_valid_browser():
        player.doModal()
    return None
Ejemplo n.º 3
0
def superbrowse():
    xbmcplugin.addSortMethod(plugin_handle, xbmcplugin.SORT_METHOD_LABEL)

    with open(
            xbmc.translatePath(generic_utility.addon_dir() +
                               '/resources/data/superbrowse_categories.json')
    ) as categories_file:
        categories = json.load(categories_file)

    for category_name, category_id in categories.iteritems():
        if 'TV' in category_name:
            video_type = 'show'
        elif 'Series' in category_name:
            video_tyoe = 'show'
        else:
            video_type = 'movie'

        add.directory(category_name, 'genre?' + category_id, 'list_videos', '',
                      video_type)

    xbmcplugin.endOfDirectory(plugin_handle)