downloader: Remove implicit source quality arg

This brings it in line with backfiller, is more flexible and less surprising
pull/27/head
Mike Lang 6 years ago
parent 00540fac9d
commit 261c57dc76

@ -14,8 +14,8 @@
// Twitch channel to capture // Twitch channel to capture
channel:: "desertbus", channel:: "desertbus",
// Stream qualities to capture in addition to source. // Stream qualities to capture
qualities:: ["480p"], qualities:: ["source", "480p"],
// Local path to save segments to. Full path must already exist. Cannot contain ':'. // 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 // On OSX you need to change this to /private/var/lib/wubloader

@ -100,7 +100,7 @@ class StreamsManager(object):
self.channel = channel self.channel = channel
self.logger = logging.getLogger("StreamsManager({})".format(channel)) self.logger = logging.getLogger("StreamsManager({})".format(channel))
self.base_dir = base_dir 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 = {} # {stream name: (fetch time, url)}
self.latest_urls_changed = gevent.event.Event() # set when latest_urls changes 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 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() 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 [] qualities = qualities.split(",") if qualities else []
manager = StreamsManager(channel, base_dir, qualities) manager = StreamsManager(channel, base_dir, qualities)
gevent.signal(signal.SIGTERM, manager.stop) # shut down on sigterm gevent.signal(signal.SIGTERM, manager.stop) # shut down on sigterm

Loading…
Cancel
Save