- print "ts2epg処理"
- bctype=chdb.chsearch(ch)['bctype']
- print ch+":"+bctype
- timet="90"
- if re.search(u'cs',bctype):
- mode="/CS"
- timet="180"
- elif re.search(u'bs',bctype):
- mode="/BS"
- timet="180"
- else :
- mode=chdb.bctypesearch(u'te'+ch)['ontv']
- epgdump=configreader.getpath("epgdump")
- if os.access(pout+".ts", os.F_OK):
- os.remove(pout+".ts")
+ timet = "90"
+ if re.search(u'CS', ch):
+ timet = "180"
+ elif len(ch)>2:
+ timet = "240"
+ writeTime(pout, ch ,timet)
+def writeTime(pout, ch ,times):
+ """
+ 指定された時間分tsを取得してepgの入ったxmlとして書き出す
+ """
+ recdblist.addCommonlogEX(u"通常","write_time(ts2epg.py)",u"Ts-EPG XML書き出し処理開始" ,u"CH:"+ch,log_level=500)
+ timet = times
+ if re.search(u'CS', ch):
+ mode = "/CS"
+ elif len(ch)>2:
+ mode = "/BS"
+ else:
+ mode = str(chdb.searchFromBctype(u'te' + ch)['ch'])
+ epgdump=configreader.getPathSetting("epgdump")
+ if os.access(pout + ".ts", os.F_OK):
+ os.remove(pout + ".ts")