diff --git a/docker-compose.jsonnet b/docker-compose.jsonnet index 64008a8..66054b4 100644 --- a/docker-compose.jsonnet +++ b/docker-compose.jsonnet @@ -14,8 +14,8 @@ // Twitch channel to capture channel:: "desertbus", - // Stream qualities to capture in addition to source. - qualities:: ["480p"], + // Stream qualities to capture + qualities:: ["source", "480p"], // Local path to save segments to. Full path must already exist. Cannot contain ':'. // On OSX you need to change this to /private/var/lib/wubloader diff --git a/downloader/downloader/main.py b/downloader/downloader/main.py index f19fe41..fb5f2be 100644 --- a/downloader/downloader/main.py +++ b/downloader/downloader/main.py @@ -100,7 +100,7 @@ class StreamsManager(object): self.channel = channel self.logger = logging.getLogger("StreamsManager({})".format(channel)) self.base_dir = base_dir - self.stream_workers = {name: [] for name in qualities + ["source"]} # {stream name: [workers]} + self.stream_workers = {name: [] for name in qualities} # {stream name: [workers]} self.latest_urls = {} # {stream name: (fetch time, url)} self.latest_urls_changed = gevent.event.Event() # set when latest_urls changes self.refresh_needed = gevent.event.Event() # set to tell main loop to refresh now @@ -500,7 +500,7 @@ class SegmentGetter(object): segments_downloaded.labels(partial="False", stream=self.channel, variant=self.stream).inc() -def main(channel, base_dir=".", qualities="", metrics_port=8001): +def main(channel, base_dir=".", qualities="source", metrics_port=8001): qualities = qualities.split(",") if qualities else [] manager = StreamsManager(channel, base_dir, qualities) gevent.signal(signal.SIGTERM, manager.stop) # shut down on sigterm