else:
try:
shutil.copy(os.path.join(recpath,title+".ts"), os.path.join(movepath,title+".ts"))
- except:
- ""
+ except Exception, inst:
+ print "Error happend in type_decode_que in timerec"
+ print "move ts error."
+ print type(inst)
+ print inst
recdb.rec_reckey(recdblist.REC_MOVE_END, title, chtxt, btime, etime, opt)
if checker.checkB25Decode(recpath + "/" + title + ".ts.b25", recpath + "/" + title + ".ts") == 1:
os.remove(recpath + "/" + title + ".ts.b25")
if not os.path.exists(pin):
tv2avi.pentaaudiots2avi(os.path.join(recpath, title+".ts"), pin)
time.sleep(3)
- #pout = recpath + "/" + title + ".avi"
pout = recpath + "/" + title + ".mkv"
recdblist.printutf8(pin)
- #recdblist.printutf8(pin+":"+pout+":"+opt)
tv2mkv.ts2mkv(pin, pout, opt)
- #tv2mp4.ts2mp4(pin, pout, opt)
- #tv2avi.ts2avi(pin, pout, opt)
recdb.del_reckey(typetxting, title, chtxt, btime)
if re.search("E", opt):
try:
- shutil.copy(os.path.join(recpath,title+".mp4"), os.path.join(movepath,title+".mp4"))
- except:
- ""
+ if os.path.exists(os.path.join(recpath,title+".mp4")):
+ shutil.copy(os.path.join(recpath,title+".mp4"), os.path.join(movepath,title+".mp4"))
+ elif os.path.exists(os.path.join(recpath,title+".mkv")):
+ shutil.copy(os.path.join(recpath,title+".mkv"), os.path.join(movepath,title+".mkv"))
+ except Exception, inst:
+ print "Error happend in type_encode_que in timerec"
+ print "move mkv/mp4 error."
+ print type(inst)
+ print inst
recdb.rec_reckey(recdblist.REC_MOVE_END, title, chtxt, btime, etime, opt)
recdb.rec_reckey(typetxtfin, title, chtxt, btime, etime, opt)
sys.exit()