本文整理汇总了Python中models.timers.getTimers函数的典型用法代码示例。如果您正苦于以下问题:Python getTimers函数的具体用法?Python getTimers怎么用?Python getTimers使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getTimers函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: P_epgdialog
def P_epgdialog(self, request):
events = self.P_epgpop(request)
timers = getTimers(self.session)
at = False
try:
from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
at = True
except ImportError:
pass
return { "events": events['events'] , "timers" : timers['timers'] , "at" : at }
示例2: P_timers
def P_timers(self, request):
timers = getTimers(self.session)
sorttype = ''
unsort = timers['timers']
if "sort" in request.args.keys():
sorttype = request.args["sort"][0]
else:
return timers
if sorttype == 'name':
timers['timers'] = sorted(unsort, key=lambda k: k['name'])
elif sorttype == 'named':
timers['timers'] = sorted(unsort, key=lambda k: k['name'], reverse=True)
elif sorttype == 'date':
timers['timers'] = sorted(unsort, key=lambda k: k['begin'])
else:
timers['timers'] = sorted(unsort, key=lambda k: k['begin'], reverse=True)
sorttype = 'dated'
timers['sort'] = sorttype
return timers
示例3: P_epgpop
def P_epgpop(self, request):
events = []
timers = []
if "sref" in request.args.keys():
ev = getChannelEpg(request.args["sref"][0])
events = ev["events"]
elif "sstr" in request.args.keys():
ev = getSearchEpg(request.args["sstr"][0])
events = ev["events"]
at = False
if len(events) > 0:
t = getTimers(self.session)
timers = t["timers"]
try:
from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
at = True
except ImportError:
pass
if config.OpenWebif.webcache.theme.value:
theme = config.OpenWebif.webcache.theme.value
else:
theme = "original"
return {"theme": theme, "events": events, "timers": timers, "at": at, "kinopoisk": getLanguage()}
示例4: P_timerlist
def P_timerlist(self, request):
ret = getTimers(self.session)
ret["locations"] = config.movielist.videodirs.value
return ret
示例5: P_timers
def P_timers(self, request):
return getTimers(self.session)