3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009-2010 Yukikaze
10 def checkB25Decode(b25filepath, decodedfilepath , csch):
12 if os.path.isfile(decodedfilepath):##tsファイルが存在している
13 dtime = time.time()-os.path.getmtime(decodedfilepath)
17 if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
20 if (compareFilesize(b25filepath, decodedfilepath, 90) and minimizeCheck(decodedfilepath, 800)):
24 dtime = time.time()-os.path.getmtime(decodedfilepath)
28 if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
31 if (compareFilesize(b25filepath, decodedfilepath, 90) and minimizeCheck(decodedfilepath, 800)):
33 #recdblist.printutf8("deleting b25 is " + str(ret))
35 def compareFilesize(pathbase, path, percentage):
37 return true if size of path is larger than that of pathbase.
38 percentage is int(0< <100)
40 if not os.path.exists(pathbase):
42 basesize = os.path.getsize(pathbase)
43 pathsize = os.path.getsize(path)
44 size = pathsize * 100-basesize * percentage
49 def minimizeCheck(filepath, minsize):
53 if os.path.getsize(filepath) > minsize * 1000 * 1000: