# HG changeset patch # User Nicolas Saunier # Date 1752178555 14400 # Node ID 7e42f83aab1f175df2eb1401b504a2c0ee06c94a # Parent f3574e43c238221f2e701b4b998a0355795efe2a added utility to print recording durations from metadata diff -r f3574e43c238 -r 7e42f83aab1f trafficintelligence/metadata.py --- a/trafficintelligence/metadata.py Fri Apr 11 16:14:51 2025 -0400 +++ b/trafficintelligence/metadata.py Thu Jul 10 16:15:55 2025 -0400 @@ -441,6 +441,17 @@ points.append(Point(al, i, p.x, p.y)) session.add_all(points) session.commit() + +def reportSiteVideoDurations(sites): + for s in sites: + print(s.name) + for cv in s.cameraViews: + startTime = cv.videoSequences[0].startTime + duration = cv.videoSequences[0].duration + for vs in cv.videoSequences: + duration += vs.duration + print(cv.description, startTime, duration) + # management # TODO need to be able to copy everything from a site from one sqlite to another, and delete everything attached to a site