OSDN Git Service

fix encode for mobile function.(option 8,9,0)
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sat, 3 Apr 2010 14:23:44 +0000 (14:23 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sat, 3 Apr 2010 14:23:44 +0000 (14:23 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@550 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/timerec.py
rec10/trunk/src/tv2mkv.py
rec10/trunk/src/tv2mp4.py

index 536ed85..dc88869 100644 (file)
@@ -610,6 +610,17 @@ def type_encode_que(typetxt,chtxt,title,bt,et,opt):
                     optt=optt.replace("8","MW8")
                     optt=optt.replace("9","MW9")
                     poutt = recpath + "/" + "m_"+title + ".mp4"
+                    if re.search("d", opt) or re.search("5", opt):
+                        if os.path.exists(os.path.join(recpath, "m_"+title+".m2v")):
+                            shutil.move(os.path.join(recpath, title+".m2v"),os.path.join(recpath, "m_"+title+".m2v"))
+                        if os.path.exists(os.path.join(recpath, "m_"+title+"_1.aac")):
+                            shutil.move(os.path.join(recpath, title+"_1.aac"),os.path.join(recpath, "m_"+title+"_1.aac"))
+                        if os.path.exists(os.path.join(recpath, "m_"+title+"_1.mp3")):
+                            shutil.move(os.path.join(recpath, title+"_1.mp3"),os.path.join(recpath, "m_"+title+"_1.mp3"))
+                        if os.path.exists(os.path.join(recpath, "m_"+title+"_2.aac")):
+                            shutil.move(os.path.join(recpath, title+"_2.aac"),os.path.join(recpath, "m_"+title+"_2.aac"))
+                        if os.path.exists(os.path.join(recpath, "m_"+title+"_2.mp3")):
+                            shutil.move(os.path.join(recpath, title+"_2.mp3"),os.path.join(recpath, "m_"+title+"_2.mp3"))
                     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"))
index 9000c30..fe26dba 100644 (file)
@@ -121,8 +121,14 @@ def raw2mkv(pin,pout,opt):#x264
     recdblist.addlog(pout, txt2, "mkvmerge-log2")
     if status.getSettings_auto_del_tmp()==1:
         if os.path.exists(pout):
-            if os.path.getsize(pout)>100*1000*1000:
-                deltitle(dir,title)
+            if re.search(opts,"MW8") or re.search(opts,"MW9"):
+                if os.path.getsize(pout)>50*1000*1000:
+                    deltitle(dir,title)
+            elif re.search(opts,"8") or re.search(opts,"9"):
+                ""
+            else:
+                if os.path.getsize(pout)>100*1000*1000:
+                    deltitle(dir,title)
 def execcomd(cmd):
     txt=""
     cmdt=u"nice -n 17 "+cmd
index f9f0fa1..7584eca 100644 (file)
@@ -128,8 +128,14 @@ def raw2mp4(pin,pout,opt):
     recdblist.addlog(pout, txt, "mp4box-log")\r
     if status.getSettings_auto_del_tmp()==1:\r
         if os.path.exists(pout):\r
-            if os.path.getsize(pout)>100*1000*1000:\r
-                deltitle(dir,title)\r
+            if re.search(opts,"MW8") or re.search(opts,"MW9"):\r
+                if os.path.getsize(pout)>50*1000*1000:\r
+                    deltitle(dir,title)\r
+            elif re.search(opts,"8") or re.search(opts,"9"):\r
+                ""\r
+            else:\r
+                if os.path.getsize(pout)>100*1000*1000:\r
+                    deltitle(dir,title)\r
 def mkv2mp4(pin,pout):\r
     exeb = configreader.getpath(u"mkvextract")\r
     exe = configreader.getpath(u"mp4Box")\r