From 031dd60897bbfdf4efb094a0bf2a8a7a0c01bcc9 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sun, 16 Dec 2018 05:28:11 -0800 Subject: [PATCH] downloader: Fix some typos around the max age calculation --- downloader/downloader/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/downloader/downloader/main.py b/downloader/downloader/main.py index 77f8671..86718e7 100644 --- a/downloader/downloader/main.py +++ b/downloader/downloader/main.py @@ -204,10 +204,10 @@ class StreamsManager(object): self.trigger_refresh() # on first round, always go immediately while not self.stopping.is_set(): # clamp time to max age to non-negative, and default to 0 if no workers exist - times_to_max_age = max(0, min([ + time_to_next_max_age = max(0, min([ self.MAX_WORKER_AGE - workers[-1].age() for workers in self.stream_workers.values() if workers - ] + [0]) + ] or [0])) # wait until refresh triggered or next max age reached logging.info("Next master playlist refresh in at most {} sec".format(time_to_next_max_age)) self.refresh_needed.wait(time_to_next_max_age)