OSDN Git Service

implement new encode for mobile option.
[rec10/rec10-git.git] / rec10 / trunk / src / timerec.py
index a31b91e..536ed85 100644 (file)
@@ -609,14 +609,18 @@ def type_encode_que(typetxt,chtxt,title,bt,et,opt):
                     optt=opt
                     optt=optt.replace("8","MW8")
                     optt=optt.replace("9","MW9")
-                    pout = recpath + "/" + "m_"+title + ".mp4"
-                    tv2mp4.ts2mp4(pin, pout, optt)
+                    poutt = recpath + "/" + "m_"+title + ".mp4"
+                    shutil.move(os.path.join(recpath, title+".ts"),os.path.join(recpath, "m_"+title+".ts"))
+                    tv2mp4.ts2mp4(os.path.join(recpath, "m_"+title+".ts"), poutt, optt)
+                    shutil.move(os.path.join(recpath, "m_"+title+".ts"),os.path.join(recpath, title+".ts"))
             else:
                 optt=opt
-                optt=optt.replace("8","\\8")
-                optt=optt.replace("9","\\9")
-                pout = recpath + "/" + "m_"+title + ".mp4"
-                tv2mp4.ts2mp4(pin, pout, optt)
+                optt=optt.replace("8","MW8")
+                optt=optt.replace("9","MW9")
+                poutt = recpath + "/" + "m_"+title + ".mp4"
+                shutil.move(os.path.join(recpath, title+".ts"),os.path.join(recpath, "m_"+title+".ts"))
+                tv2mp4.ts2mp4(os.path.join(recpath, "m_"+title+".ts"), poutt, optt)
+                shutil.move(os.path.join(recpath, "m_"+title+".ts"),os.path.join(recpath, title+".ts"))
             recdb.del_reckey(typetxting, title, chtxt, btime)
             time.sleep(10)
             if re.search("E", opt):