示例#1
0
 def P_settings(self, request):
     ret = {"result": True}
     ret['configsections'] = getConfigsSections()['sections']
     if config.OpenWebif.webcache.theme.value:
         if os.path.exists(getPublicPath('themes')):
             ret['themes'] = config.OpenWebif.webcache.theme.choices
         else:
             ret['themes'] = ['original', 'clear']
         ret['theme'] = config.OpenWebif.webcache.theme.value
     else:
         ret['themes'] = []
         ret['theme'] = 'original'
     if config.OpenWebif.webcache.moviedb.value:
         ret['moviedbs'] = config.OpenWebif.webcache.moviedb.choices
         ret['moviedb'] = config.OpenWebif.webcache.moviedb.value
     else:
         ret['moviedbs'] = []
         ret['moviedb'] = EXT_EVENT_INFO_SOURCE
     ret['zapstream'] = config.OpenWebif.webcache.zapstream.value
     ret['showpicons'] = config.OpenWebif.webcache.showpicons.value
     ret['showchanneldetails'] = config.OpenWebif.webcache.showchanneldetails.value
     ret['showiptvchannelsinselection'] = config.OpenWebif.webcache.showiptvchannelsinselection.value
     ret['screenshotchannelname'] = config.OpenWebif.webcache.screenshotchannelname.value
     ret['showallpackages'] = config.OpenWebif.webcache.showallpackages.value
     ret['allowipkupload'] = config.OpenWebif.allow_upload_ipk.value
     loc = getLocations()
     ret['locations'] = loc['locations']
     if os.path.exists(VIEWS_PATH + "/responsive"):
         ret['responsivedesign'] = config.OpenWebif.responsive_enabled.value
     return ret
示例#2
0
	def P_at(self, request):
		ret = {}
		ret['hasVPS'] = 0
		ret['hasSeriesPlugin'] = 0
		ret['test'] = 0
		ret['autoadjust'] = getInfo()['timerautoadjust']
		ret['searchTypes'] = {}

		try:
			from Plugins.Extensions.AutoTimer.AutoTimer import typeMap
			ret['searchTypes'] = typeMap
		except ImportError as e:
			pass
		if config.OpenWebif.autotimer_regex_searchtype.value:
			ret['searchTypes']['regex'] = 0

		loc = getLocations()
		ret['locations'] = loc['locations']

		try:
			from Plugins.SystemPlugins.vps import Vps  # noqa: F401
			ret['hasVPS'] = 1
		except ImportError as e:
			pass
		try:
			from Plugins.Extensions.SeriesPlugin.plugin import Plugins  # noqa: F401
			ret['hasSeriesPlugin'] = 1
		except ImportError as e:
			pass
		try:
			from Plugins.Extensions.AutoTimer.AutoTimerResource import AutoTimerTestResource  # noqa: F401
			ret['test'] = 1
		except ImportError as e:
			pass
		return ret
示例#3
0
    def P_at(self, request):
        ret = {}
        ret['hasVPS'] = 0
        ret['hasSeriesPlugin'] = 0
        ret['test'] = 0
        try:
            from Plugins.Extensions.AutoTimer.AutoTimer import typeMap
            ret['types'] = typeMap
        except ImportError:
            pass
        loc = getLocations()
        ret['locations'] = loc['locations']

        try:
            from Plugins.SystemPlugins.vps import Vps  # noqa: F401
            ret['hasVPS'] = 1
        except ImportError:
            pass
        try:
            from Plugins.Extensions.SeriesPlugin.plugin import Plugins  # noqa: F401
            ret['hasSeriesPlugin'] = 1
        except ImportError:
            pass
        try:
            from Plugins.Extensions.AutoTimer.AutoTimerResource import AutoTimerTestResource  # noqa: F401
            ret['test'] = 1
        except ImportError:
            pass
        return ret
示例#4
0
    def P_at(self, request):
        ret = {}
        ret['hasVPS'] = 1 if HASVPS else 0
        ret['hasSeriesPlugin'] = 1 if HASSERIES else 0
        ret['test'] = 1 if HASAUTOTIMERTEST else 0
        ret['hasChange'] = 1 if HASAUTOTIMERCHANGE else 0
        ret['autoadjust'] = getInfo()['timerautoadjust']
        ret['searchTypes'] = ATSEARCHTYPES

        if config.OpenWebif.autotimer_regex_searchtype.value:
            ret['searchTypes']['regex'] = 0

        loc = getLocations()
        ret['locations'] = loc['locations']
        ret['showiptvchannelsinselection'] = config.OpenWebif.webcache.showiptvchannelsinselection.value
        return ret