X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=rec10%2Ftrunk%2Fsrc%2Ftimerec.py;h=1bb2d559e906ab064e85d68bd1040f2cb69c6498;hb=7e28f9a40b5c06d9d9feb7633af380bde72559d3;hp=e532bb3f5d3c3be7bf54767dba71c410a4f2f780;hpb=b4eb9c9a9e97393126fcc0f59fc9003a9833698b;p=rec10%2Frec10-git.git diff --git a/rec10/trunk/src/timerec.py b/rec10/trunk/src/timerec.py index e532bb3..1bb2d55 100644 --- a/rec10/trunk/src/timerec.py +++ b/rec10/trunk/src/timerec.py @@ -22,6 +22,7 @@ import status import tv2avi import tv2mkv import tv2mp4 +import install import recdblist recpath = configreader.getpath('recpath') movepath = configreader.getpath('move_destpath') @@ -31,6 +32,11 @@ def task(): 数分毎に実行されるタスク処理 予定によって子プロセスを生成し処理する。 """ + try: + if rec10d.rec10db.select_installed_in_status()==0: + install.install() + except: + install.install() recdb.delete_old("24") recdb.delete_old_auto_bayes("1") recdb.delete_old_auto_keyword("1") @@ -54,6 +60,7 @@ def task(): if pid!=0: "" else: + time.sleep(10) auto_process.auto_check(recpath) sys.exit() update = chdb.update() @@ -168,7 +175,8 @@ def task(): else: recdb.del_reckey(recdblist.REC_AVI_TO_MKV, title, chtxt, btime) recdb.rec_reckey(recdblist.REC_CHANGING_CANTAINER, title, chtxt, btime, etime, opt) - tv2mkv.avi2mkv(os.path.join(recpath,title+".avi"),os.path.join(recpath,title+".mkv")) + #tv2mp4.avi2mp4(os.path.join(recpath,title+".avi"),os.path.join(recpath,title+".mkv"),opt) + tv2mkv.avi2mkv(os.path.join(recpath,title+".avi"),os.path.join(recpath,title+".mkv"),opt) recdb.del_reckey(recdblist.REC_CHANGING_CANTAINER, title, chtxt, btime) sys.exit() elif task["type"] == recdblist.REC_AVI_TO_MP4: @@ -179,7 +187,7 @@ def task(): else: recdb.del_reckey(recdblist.REC_AVI_TO_MP4, title, chtxt, btime) recdb.rec_reckey(recdblist.REC_CHANGING_CANTAINER, title, chtxt, btime, etime, opt) - tv2mp4.avi2mp4(os.path.join(recpath,title+".avi"),os.path.join(recpath,title+".mp4")) + tv2mp4.avi2mp4(os.path.join(recpath,title+".avi"),os.path.join(recpath,title+".mp4"),opt) recdb.del_reckey(recdblist.REC_CHANGING_CANTAINER, title, chtxt, btime) sys.exit() elif task["type"] == recdblist.REC_MKV_TO_MP4: @@ -188,7 +196,7 @@ def task(): if pid > 0:#親プロセスの場合 "" else: - recdb.del_reckey(recdblist.REC_AVI_TO_MP4, title, chtxt, btime) + recdb.del_reckey(recdblist.REC_MKV_TO_MP4, title, chtxt, btime) recdb.rec_reckey(recdblist.REC_CHANGING_CANTAINER, title, chtxt, btime, etime, opt) tv2mp4.mkv2mp4(os.path.join(recpath,title+".mkv"),os.path.join(recpath,title+".mp4")) recdb.del_reckey(recdblist.REC_CHANGING_CANTAINER, title, chtxt, btime) @@ -312,7 +320,7 @@ def type_final(typetxt,chtxt,title,bt,et,opt): testpath=[os.path.join(recpath,title+".ts.b25")] testpath.append(os.path.join(recpath,title+".ts")) testpath.append(os.path.join(recpath,title+".avi")) - testpath.append(os.path.join(recpath,title+".mkv")) + testpath.append(os.path.join(recpath,title+".mp4")) testpath.append(os.path.join(recpath,title+".log")) tcheck=0 for ti in testpath: @@ -478,13 +486,13 @@ def type_encode_que(typetxt,chtxt,title,bt,et,opt): if re.search("5", opt): pin = recpath + "/" + title + ".sa.avi" #pout = recpath + "/" + title + ".avi" - pout = recpath + "/" + title + ".mp4" + pout = recpath + "/" + title + ".mkv" recdblist.printutf8(pin) #recdblist.printutf8(pin+":"+pout+":"+opt) recdb.del_reckey(typetxtnow, title, chtxt, btime) recdb.rec_reckey(typetxting, title, chtxt, btime, etime, opt) - #tv2mkv.ts2mkv(pin, pout, opt) - tv2mp4.ts2mp4(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):