import tv2avi
import tv2mkv
import tv2mp4
+import install
import recdblist
recpath = configreader.getpath('recpath')
movepath = configreader.getpath('move_destpath')
数分毎に実行されるタスク処理
予定によって子プロセスを生成し処理する。
"""
+ 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")
if pid!=0:
""
else:
+ time.sleep(10)
auto_process.auto_check(recpath)
sys.exit()
update = chdb.update()
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:
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:
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)
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:
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):