本文整理汇总了Python中RecordTimer.RecordTimerEntry.orig方法的典型用法代码示例。如果您正苦于以下问题:Python RecordTimerEntry.orig方法的具体用法?Python RecordTimerEntry.orig怎么用?Python RecordTimerEntry.orig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecordTimer.RecordTimerEntry
的用法示例。
在下文中一共展示了RecordTimerEntry.orig方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getTimers
# 需要导入模块: from RecordTimer import RecordTimerEntry [as 别名]
# 或者: from RecordTimer.RecordTimerEntry import orig [as 别名]
def getTimers(self):
self._timer_list = []
self._processed_timers = []
baseurl = self.getBaseUrl()
print "[GBIpboxRemoteTimer] get remote timer list"
try:
httprequest = urllib2.urlopen(baseurl + '/web/timerlist')
xmldoc = minidom.parseString(httprequest.read())
timers = xmldoc.getElementsByTagName('e2timer')
for timer in timers:
serviceref = ServiceReference(getValueFromNode(timer, 'e2servicereference'))
begin = int(getValueFromNode(timer, 'e2timebegin'))
end = int(getValueFromNode(timer, 'e2timeend'))
name = getValueFromNode(timer, 'e2name')
description = getValueFromNode(timer, 'e2description')
eit = int(getValueFromNode(timer, 'e2eit'))
disabled = int(getValueFromNode(timer, 'e2disabled'))
justplay = int(getValueFromNode(timer, 'e2justplay'))
afterevent = int(getValueFromNode(timer, 'e2afterevent'))
repeated = int(getValueFromNode(timer, 'e2repeated'))
location = getValueFromNode(timer, 'e2location')
tags = getValueFromNode(timer, 'e2tags').split(" ")
entry = RecordTimerEntry(serviceref, begin, end, name, description, eit, disabled, justplay, afterevent, dirname = location, tags = tags, descramble = 1, record_ecm = 0, isAutoTimer = 0, always_zap = 0)
entry.repeated = repeated
entry.orig = RecordTimerEntry(serviceref, begin, end, name, description, eit, disabled, justplay, afterevent, dirname = location, tags = tags, descramble = 1, record_ecm = 0, isAutoTimer = 0, always_zap = 0)
entry.orig.repeated = repeated
if entry.shouldSkip() or entry.state == TimerEntry.StateEnded or (entry.state == TimerEntry.StateWaiting and entry.disabled):
insort(self._processed_timers, entry)
else:
insort(self._timer_list, entry)
except Exception, e:
print "[GBIpboxRemoteTimer]", e