Пример #1
0
def run(url, handle, qs):
    global user_debrids
    user_debrids = []
    for provider in get_user_debrid_providers():
        user_debrid = get_debrid_provider(provider)
        if authenticate(user_debrid):
            save_debrid_settings(user_debrid)
            user_debrids.append(user_debrid)
        else:
            ui.notify(provider + " not active")
    if not user_debrids:
        ui.notify("No Debrid service active")
    router.run(url, handle, qs)
Пример #2
0
                with open(nfo_file, 'w') as nfo:
                    imdb_url = 'https://www.imdb.com/title/{}/'.format(imdbid)
                    nfo.write(imdb_url)
                with open(strm_file, 'w') as strm:
                    strm_url = ('plugin://plugin.video.openmeta/'
                                'movies/play/imdb/{}').format(imdbid)
                    strm.write(strm_url)
    xbmcgui.Dialog().notification('FoxyLists', 'Updated liked trakt lists')


@router.route('/open_lists')
def open_list_dir():
    directory = 'special://userdata/addon_data/' + router.id_
    xbmc.executebuiltin('ActivateWindow(10025,' + directory + ', return)')


@router.route('/')
def root():
    xbmcplugin.addDirectoryItem(router.handle,
                                router.build_url(authenticate_trakt),
                                xbmcgui.ListItem('Authenticate Trakt'))
    xbmcplugin.addDirectoryItem(router.handle, router.build_url(refresh_liked),
                                xbmcgui.ListItem('Refresh Liked'))
    xbmcplugin.addDirectoryItem(router.handle, router.build_url(open_list_dir),
                                xbmcgui.ListItem('Open Lists'))
    xbmcplugin.endOfDirectory(router.handle)


if __name__ == '__main__':
    router.run()
Пример #3
0
def run(url, handle, path):
    router.run(url, handle, path)