From b33a01065eedaafa2940184efcc92e17013c704a Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 25 Oct 2021 14:04:08 -0700 Subject: [PATCH] Don't bother trying to iterate refresh_ids if it's empty. --- ycdl/objects.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ycdl/objects.py b/ycdl/objects.py index f030d30..14427a0 100644 --- a/ycdl/objects.py +++ b/ycdl/objects.py @@ -199,11 +199,10 @@ class Channel(ObjectBase): if refresh_ids: log.debug('Refreshing %d ids separately.', len(refresh_ids)) - - # We call ingest_video instead of insert_video so that - # premieres / livestreams which have finished can be automarked. - for video_id in self.ycdldb.youtube.get_videos(refresh_ids): - self.ycdldb.ingest_video(video_id) + # We call ingest_video instead of insert_video so that + # premieres / livestreams which have finished can be automarked. + for video_id in self.ycdldb.youtube.get_videos(refresh_ids): + self.ycdldb.ingest_video(video_id) def reset_uploads_playlist_id(self): '''