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)
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()
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
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)
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))