当前位置: 首页>>代码示例>>Python>>正文


Python RecordTimerEntry.orig方法代码示例

本文整理汇总了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
开发者ID:sunder67,项目名称:gbremote-client,代码行数:40,代码来源:GBIpboxRemoteTimer.py


注:本文中的RecordTimer.RecordTimerEntry.orig方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。