#!/usr/bin/python
# coding: UTF-8
# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
+# Copyright (C) 2009-2010 Yukikaze
#import sys # モジュール属性 argv を取得するため
import os
import re
"""
tsを取得してepgの入ったxmlとして書き出す
"""
- recdblist.printutf8(u"Ts-EPG XML書き出し処理開始")
- bctype = chdb.chsearch(ch)['bctype']
- recdblist.printutf8(ch + ":" + bctype)
timet = "90"
- if re.search(u'cs', bctype):
- mode = "/CS"
+ if re.search(u'CS', ch):
timet = "180"
- elif re.search(u'bs', bctype):
- mode = "/BS"
+ elif len(ch)>2:
timet = "240"
+ write_time(pout, ch ,timet)
+def write_time(pout, ch ,times):
+ """
+ 指定された時間分tsを取得してepgの入ったxmlとして書き出す
+ """
+ recdblist.printutf8(u"Ts-EPG XML書き出し処理開始")
+ recdblist.printutf8(u"CH:"+ch)
+ timet = times
+ if re.search(u'CS', ch):
+ mode = "/CS"
+ elif len(ch)>2:
+ mode = "/BS"
else:
mode = chdb.bctypesearch(u'te' + ch)['ontv']
epgdump = configreader.getpath("epgdump")
recdblist.printutf8(exe)
os.system(exe)
time.sleep(10)
-