Esempio n. 1
0
            item.add_stream_info('video', stream_values={})
            item.set_is_playable(True)
            plugin.play_video(item)
            return None
    except:
        plugin.notify(msg="Failed: {0}".format(resolved.partition('.')[-1]), title="YOUTUBE-DL", delay=1000)
    if len(resolved) > 1:
        plugin.set_resolved_url(resolved)
        item = ListItem.from_dict(path=resolved)
        plugin.play_video(item)
        return None
    else:
        plugin.set_resolved_url(url)
        plugin.play_video(url)
        return None


if __name__ == '__main__':
    hostname = ''
    hostname = plugin.get_setting('setHostname')
    if len(hostname) > 1:
        hostname = hostname.strip()
        hostname = hostname.strip('/')
        if str(hostname).startswith('http'):
            __BASEURL__ = hostname
        else:
            __BASEURL__ = 'https://' + hostname
    plugin.run()
    plugin.set_content('episodes')
    plugin.set_view_mode(0)
Esempio n. 2
0
        return None


if __name__ == '__main__':
    # if plugin.get_setting('debugon', converter=bool): web_pdb.set_trace()
    viewmode = 0
    hostname = ''
    hostname = plugin.get_setting('setHostname')
    if len(hostname) > 1:
        hostname = hostname.strip()
        hostname = hostname.strip('/')
        if str(hostname).startswith('http'):
            __BASEURL__ = hostname
        else:
            __BASEURL__ = 'https://' + hostname
    ws.BASEURL = __BASEURL__
    ws.Plugin = plugin
    ws.Remove = removeshow
    ws.Episode = episode
    ws.Category = category
    ws.Save = saveshow
    ws.Autoplay = autoplay
    ws.Play = play
    # funcmaps = {'episode': episode, 'category': category, 'save': saveshow, 'autoplay': autoplay, 'play': play, 'remove': reemoveshow, 'search': search}
    # ws = WsolUtils(kodiplugin=plugin, **funcmaps)
    plugin.run()
    plugin.set_content('episodes')
    viewmode = plugin.get_setting('viewmode', converter=int)
    plugin.set_view_mode(view_mode_id=viewmode)
    # plugin.set_view_mode(plugin.get_setting('viewmode'))
Esempio n. 3
0
            plugin.log.error(
                msg="Tumblr API OAuth settings invalid. This addon requires you to authorize this Addon in your Tumblr account and in turn in the settings you must provide the TOKEN and SECRET that Tumblr returns.\nhttps://api.tumblr.com/console/calls/user/info\n\tUse the Consumer Key and Secret from the addon settings to authorize this addon and the OAUTH Token and Secret the website returns must be put into the settings.")
            try:  # Try an old style API key from off github as a backup so some functionality is provided?
                TUMBLRAUTH = dict(consumer_key='5wEwFCF0rbiHXYZQQeQnNetuwZMmIyrUxIePLqUMcZlheVXwc4',
                                  consumer_secret='GCLMI2LnMZqO2b5QheRvUSYY51Ujk7nWG2sYroqozW06x4hWch',
                                  oauth_token='RBesLWIhoxC1StezFBQ5EZf7A9EkdHvvuQQWyLpyy8vdj8aqvU',
                                  oauth_secret='GQAEtLIJuPojQ8fojZrh0CFBzUbqQu8cFH5ejnChQBl4ljJB4a')
                TUMBLRAUTH.update({'api_key', '5wEwFCF0rbiHXYZQQeQnNetuwZMmIyrUxIePLqUMcZlheVXwc4'})
                tclient = TumblrRestClient(**TUMBLRAUTH)
            except:
                plugin.notify(msg="Read Settings for instructions", title="COULDN'T AUTH TO TUMBLR")
    viewmode = int(plugin.get_setting('viewmode'))
    plugin.run()    
    txtout = "-=**" + ("*"*10) + " {0} " + ("*"*10) + "**=-"
    reqout = "PATH: {0} QUERY: {1}\nURL: {2} ARGS: {3}".format(str(plugin.request.path), str(plugin.request.query_string), str(plugin.request.url), str(plugin.request.args))
    txtout = txtout.format(reqout)
    plugin.log.info(msg=txtout)
    print (txtout)
    ctxlist = []
    plugin.set_content(content='movies')
    viewmodel = 51
    viewmodet = 500
    if str(plugin.request.path).startswith('/taglist/') or plugin.request.path == '/':
        viewmodel = int(plugin.get_setting('viewmodelist'))
        if viewmodel == 0: viewmodel = 51
        plugin.set_view_mode(viewmodel)
    else:
        viewmodet = int(plugin.get_setting('viewmodethumb'))
        if viewmodet == 0: viewmodet = 500
        plugin.set_view_mode(viewmodet)
Esempio n. 4
0
    return litems

@plugin.route('/search/')
def search():
    """
    Search currently searches just spankwire but want to expand this search over the search performed in site() to run each
    of those searches for every site and return all results in this one section for now i have removed the route to this
    search until I can finish the global search.
    """
    urlbase = "http://www.spankwire.com/api/HubTrafficApiCall?"
    caturl = urlbase + "data=getCategoriesList&output=json&segment=gay"
    catvidsurl = urlbase + "data=searchVideos&output=json&thumbsize=small&count=100&segment=gay&search=&tags=&category={0}"
    searchurl = urlbase + "data=searchVideos&output=json&thumbsize=small&count=100&segment=gay&search={0}&tags=&category="
    thumbcaturl = "http://cdn2.static.spankwire.com/images/category/Gay/{0}.jpg"
    searchtxt = ''
    searchtxt = plugin.get_setting('lastsearch')
    searchtxt = plugin.keyboard(searchtxt, 'Search Spankwire', False)
    searchquery = searchtxt.replace(' ', '+')
    plugin.set_setting(key='lastsearch', val=searchtxt)
    url = searchurl.format(searchquery)
    itemslist = parseVideosUrl(url)
    viditems = makeVideoItems(itemslist)
    return viditems


if __name__ == '__main__':
    plugin.run()
    viewmode = int(plugin.get_setting('viewmode'))
    if viewmode is None: viewmode = 500
    plugin.set_view_mode(viewmode)
Esempio n. 5
0
            plugin.play_video(item)
            return None
    except:
        plugin.notify(msg="Failed: {0}".format(resolved.partition('.')[-1]),
                      title="YOUTUBE-DL",
                      delay=1000)
    if len(resolved) > 1:
        plugin.set_resolved_url(resolved)
        item = ListItem.from_dict(path=resolved)
        plugin.play_video(item)
        return None
    else:
        plugin.set_resolved_url(url)
        plugin.play_video(url)
        return None


if __name__ == '__main__':
    hostname = ''
    hostname = plugin.get_setting('setHostname')
    if len(hostname) > 1:
        hostname = hostname.strip()
        hostname = hostname.strip('/')
        if str(hostname).startswith('http'):
            __BASEURL__ = hostname
        else:
            __BASEURL__ = 'https://' + hostname
    plugin.run()
    plugin.set_content('episodes')
    plugin.set_view_mode(0)