summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeodarZ <neodarz@neodarz.net>2017-10-15 14:40:29 +0200
committerNeodarZ <neodarz@neodarz.net>2017-10-15 14:40:29 +0200
commite67d50d096cafbd33108dca028760baa6618bd2e (patch)
tree8a8f162e3618207b8a3eae0430f052f4db652120
parent330599cf707e264deb1ae87818fa474b3d33253c (diff)
downloadvideo_save-e67d50d096cafbd33108dca028760baa6618bd2e.tar.xz
video_save-e67d50d096cafbd33108dca028760baa6618bd2e.zip
Get more solid test for get time
-rwxr-xr-xconvert.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/convert.py b/convert.py
index 4d1cc67..2047637 100755
--- a/convert.py
+++ b/convert.py
@@ -88,7 +88,7 @@ for file in sorted(os.listdir(sourcedir)):
totalRange = time.strptime(total.split('.')[0],'%H:%M:%S')
totalRangeS = datetime.timedelta(hours=totalRange.tm_hour,minutes=totalRange.tm_min,seconds=totalRange.tm_sec).total_seconds()
if re.match(r'.*time=.*', str(unknown_line)):
- timeRange = time.strptime(str(unknown_line).split("=")[2].split()[0].split('.')[0],'%H:%M:%S')
+ timeRange = time.strptime(str(unknown_line).partition("time=")[2].split('.')[0],'%H:%M:%S')
timeRangeS = datetime.timedelta(hours=timeRange.tm_hour,minutes=timeRange.tm_min,seconds=timeRange.tm_sec).total_seconds()
print(str(round(100*timeRangeS/totalRangeS, 1))+"% / 100% "+str(exist), end='\r')