-def tv2b25ts(pout, ch, time):
- exe = configreader.getConfPath('recpt1')
- if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
- status.changeBSCSRecording(1)
- else:
- status.changeTERecording(1)
- try:
- doexe = exe + ' ' + ch + ' ' + time + ' \'' + pout + '\''
- recdblist.printutf8(doexe)
- recdblist.addLog(pout, doexe, u"recpt1ログ-コマンド")
- recdblist.addLog(pout, unicode(commands.getoutput(doexe.encode('utf-8')),'utf-8'), u"recpt1ログ-詳細")
- except Exception, inst:
- recdblist.addCommonlogEX(u"Error",u"tv2b25ts(tv2ts.py)", str(type(inst)),str(inst))
- if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
- status.changeBSCSRecording(-1)
- else:
- status.changeTERecording(-1)
+def tv2b25ts(pout, ch, time,tsid):
+ if recording_earth_pt1.useDVB()==0:
+ exe = configreader.getConfPath('recpt1')
+ if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
+ status.changeBSCSRecording(1)
+ else:
+ status.changeTERecording(1)
+ try:
+ doexe = exe + ' ' + ch + ' ' + time + ' \'' + pout + '\''
+ recdblist.printutf8(doexe)
+ recdblist.addLog(pout, doexe, u"recpt1ログ-コマンド")
+ recdblist.addLog(pout, unicode(commands.getoutput(doexe.encode('utf-8')),'utf-8'), u"recpt1ログ-詳細")
+ except Exception, inst:
+ recdblist.addCommonlogEX(u"Error",u"tv2b25ts(tv2ts.py)", str(type(inst)),str(inst))
+ if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
+ status.changeBSCSRecording(-1)
+ else:
+ status.changeTERecording(-1)
+ elif recording_earth_pt1.useDVB()==1:
+ if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
+ status.changeBSCSRecording(1)
+ else:
+ status.changeTERecording(1)
+ try:
+ recording_earth_pt1.record(ch,tsid,pout,time,0)
+ except Exception, inst:
+ recdblist.addCommonlogEX(u"Error",u"tv2b25ts(tv2ts.py)", str(type(inst)),str(inst))
+ if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
+ status.changeBSCSRecording(-1)
+ else:
+ status.changeTERecording(-1)
+ if os.path.exists(pout):
+ try:
+ os.chmod(pout,0755)
+ except:
+ ""