OSDN Git Service

fix mp4 auto-del.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 22 Mar 2010 12:22:36 +0000 (12:22 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 22 Mar 2010 12:22:36 +0000 (12:22 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@501 4e526526-5e11-4fc0-8910-f8fd03428081

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