OSDN Git Service

fix mp4 auto-del.
[rec10/rec10-git.git] / rec10 / trunk / src / tv2mp4.py
index 1f18a52..6d63a58 100644 (file)
@@ -147,15 +147,10 @@ def mkv2mp4(pin,pout):
     recdblist.addlog(pin, txt, "MKV2MP4-log")\r
     txt = "\n####MKV2MP4-log####\n"+txt\r
     time.sleep(10)\r
-    if os.path.exists(pout):\r
-        if os.path.exists(audiopath):\r
-            os.remove(audiopath)\r
-        if os.path.exists(videopath):\r
-            os.remove(videopath)\r
-        if os.path.exists(timecodepath):\r
-            os.remove(timecodepath)\r
-        if os.path.exists(tmpmp4):\r
-            os.remove(tmpmp4)\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
 def execmp4box(pin,pout,cmd):\r
     title=os.path.splitext(os.path.split(pin)[1])[0]\r
     ptin=os.path.join(os.path.dirname(pin),base64.b16encode(title.encode('utf-8'))+".264")\r