wip is done

This commit is contained in:
jb-alvarado 2019-03-06 15:02:56 +01:00
parent f3e5024f8a
commit 55b8ecf6fe
2 changed files with 0 additions and 52 deletions

View File

@ -1,34 +0,0 @@
{
"channel": "Test 1",
"date": "2019-03-05",
"begin": "06:00:00.000",
"length": "24:00:00.000",
"program": [{
"in": 0,
"out": 647.68,
"duration": 647.68,
"source": "/Media/clip1.mp4"
},
{
"in": 0,
"out": 149,
"duration": 149,
"source": "/Media/clip2.mp4"
},
{
"in": 0,
"out": 114.72,
"duration": 114.72,
"source": "/Media/clip3.mp4"
},
{
"in": 0,
"out": 2531.36,
"duration": 2531.36,
"source": "/Media/clip4.mp4"
}
]
}

View File

@ -1,18 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
with open('2019-03-05.json') as f:
data = json.load(f)
h, m, s = data["begin"].split(':')
begin = float(h) * 3600 + float(m) * 60 + float(s)
for item in data["program"]:
inp = item["in"]
out = item["out"]
duration = item["duration"]
print(begin)
begin += out - inp