3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009 Yukikaze
8 def checkB25Decode(b25filepath, decodedfilepath):
10 if os.path.isfile(decodedfilepath):##tsファイルが存在している
11 dtime = time.time()-os.path.getmtime(decodedfilepath)
14 if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
19 if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
21 #recdblist.printutf8("delete b25 is " + str(ret))
23 def compareFilesize(pathbase, path, percentage):
25 return true if size of path is larger than that of pathbase.
26 percentage is int(0< <100)
28 basesize = os.path.getsize(pathbase)
29 pathsize = os.path.getsize(path)
30 size = pathsize * 100-basesize * percentage
35 def minimizeCheck(filepath, minsize):
39 print os.path.getsize(filepath)
40 if os.path.getsize(filepath) > minsize * 1000 * 1000: