示例#1
0
 def __init__(self, container, page=None, addonid=None):
     self.__items = []
     self.__nextpage = (None, None, {}, {})
     self.__page = page
     self.__addonid = addonid
     self.setting = addon.kodisetting(addonid)
     super(scraperextension, self).__init__(container)
示例#2
0
 def config_pvr():
     if iptv.isenabled():
         pvr_settings = addon.kodisetting(IPTVSIMPLE)
         if not pvr_settings.getint("m3uPathType") == 1:
             pvr_settings.set("m3uPathType", 1)
         m3uurl = "http://localhost:%s" % cfg.port
         if not pvr_settings.getstr("m3uUrl") == m3uurl:
             pvr_settings.set("m3uUrl", m3uurl)
         if not pvr_settings.getint("epgPathType") == 0:
             pvr_settings.set("epgPathType", 0)
         if not pvr_settings.getstr("epgPath") == common.epath:
             pvr_settings.set("epgPath", cfg.epath)
         iptv.reload_pvr()
示例#3
0
def getconfig(prefix):
    setting = addon.kodisetting("plugin.program.vods-players")
    uname = setting.getstr("%s_uname" % prefix)
    source = setting.getstr("%s_source" % prefix)
    branch = setting.getstr("%s_branch" % prefix)
    bsource = setting.getstr("%s_branch_source" % prefix)
    commit = setting.getstr("%s_commit" % prefix)
    if source == "Latest Release":
        branch = None
    if commit.lower().strip() == "latest":
        commit = None
    if bsource == "Latest Commit":
        commit = None
    return uname, branch, commit
示例#4
0
 def __init__(self):
     self.setting = addon.kodisetting(common.addon_id)
     self.hay = hay.stack(common.hay_chan, aid=common.addon_id)
     self.phay = hay.stack(common.hay_playlist, aid=common.addon_id)
示例#5
0
def encodeurl(**kwargs):
    port = addon.kodisetting(common.addon_id).getstr("port")
    for kwarg in kwargs:
        kwargs[kwarg] = parse.quote_plus(json.dumps(kwargs[kwarg]))
    return "http://localhost:%s/?%s" % (port, parse.urlencode(kwargs))