Clean up imports, fix bug
authorJakob Cornell <jakob@jcornell.net>
Sat, 4 Jan 2020 04:43:03 +0000 (22:43 -0600)
committerJakob Cornell <jakob@jcornell.net>
Sat, 4 Jan 2020 04:43:03 +0000 (22:43 -0600)
hls_watch/__init__.py

index c7981f4d42b158f59447c30fca220f07916f9320..114656ec0d9e9b16c5c09647fd846a9a6604b449 100644 (file)
@@ -1,5 +1,4 @@
 from collections import namedtuple
-import contextlib
 import datetime
 import itertools
 import re
@@ -227,8 +226,6 @@ class CaptureHandler:
                        self.in_sess = False
 
        def update(self, capture):
-               from functools import partial
-
                if self.sync_tail:
                        new = self.sync_tail.intersect_right(capture.playlist)
                        if new:
@@ -278,7 +275,7 @@ class BufferedWriter:
        def put_entry(self, entry, time = None):
                if isinstance(entry, Segment):
                        while self.buffer:
-                               self.dest.put_entry(self.buffer.pop(0))
+                               self.dest.put_entry(self.buffer.pop(0), time)
                        self.flushed = True
                        self.dest.put_entry(entry, time)
                elif self.flushed and isinstance(entry, Endlist):