title = os.path.split(avif)[1]
title = title.replace(ext, "")
avipath = os.path.join(dir, title + ext)
- dtime = time.time()-os.path.getmtime(avipath)
- dtime = int(dtime)
- if dtime > 300:
- if veryfySize(avipath):
- ret.append(title)
+ if os.path.exists(avipath):
+ dtime = time.time()-os.path.getmtime(avipath)
+ dtime = int(dtime)
+ if dtime > 300:
+ if veryfySize(avipath):
+ ret.append(title)
return ret
def get_move_dest_path(title,temppath,recpath,ext):
dstpath=os.path.join(recpath,title+ext)
if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
ret = 1
else:
- if (compareFilesize(b25filepath, decodedfilepath, 90) and minimizeCheck(decodedfilepath, 800)):
+ if (compareFilesize(b25filepath, decodedfilepath, 80) and minimizeCheck(decodedfilepath, 800)):
ret = 1
else:
time.sleep(30)
#import zenhan
#import auto_process
import datetime
-__author__ = "yukikaze"
+import tv2mp4
path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
recpath = "/home/ftpusr/ftp-tmp/Recording/"
ftpusr = "/home/ftpusr/ftp-tmp"
recordedpath = "/home/ftpusr/ftp5/Series-Finish/"
if __name__ == "__main__":
- import profile
- profile.run(rec10d.main())
\ No newline at end of file
+ ""
\ No newline at end of file
e0=ffmpeg+" -i \""+pts+"\" -y -vn -f aac -acodec copy \""+paac+"\""
p0=subprocess.Popen(e0,shell=True)
time.sleep(60)
- if p0.poll==-1:#実行中
+ if p0.poll==None:#実行中
if os.path.getsize(paac)<1000:#1mで1kb以下の場合自動で終了
os.kill(p0.pid,signal.SIGKILL)
os.remove(paac)
if os.path.isfile(cap2ass):\r
e0=wineexe+u" "+cap2ass+u" -format srt \"Z:\\"+pts+"\" \"Z:\\"+pincap+"\""\r
recdblist.printutf8(e0)\r
- p0=subprocess.Popen(e0,shell=True)\r
+ p0=subprocess.Popen(e0,shell=True,env="LANG=ja_JP.UTF-8",stdout=subprocess.PIPE)\r
time.sleep(120)\r
- if p0.poll==-1:#実行中\r
+ if p0.poll==None:#実行中\r
if os.path.getsize(pincap)<1000:#2mで1kb以下の場合自動で終了\r
os.kill(p0.pid,signal.SIGKILL)\r
else:\r
os.waitpid(p0.pid, 0)\r
+ recdblist.addlog(pts,unicode(p0.communicate, "UTF-8"), "Caption-Log")\r
+\r
if os.path.getsize(pincap)>1000:\r
exe = configreader.getpath("mp4box")\r
e1s=exe +u" -add \""+pincap+"\" \""+pout+"\""\r