From a03ee5de90acfbe9ef830502918bd4867e4aefb5 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 31 Oct 2021 12:51:17 -0700 Subject: [PATCH] Don't bother calling ytapi.get_videos if no new ids from RSS. --- ycdl/objects.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ycdl/objects.py b/ycdl/objects.py index 14427a0..f726523 100644 --- a/ycdl/objects.py +++ b/ycdl/objects.py @@ -118,6 +118,8 @@ class Channel(ObjectBase): except exceptions.NoVideos as exc: raise exceptions.RSSAssistFailed(f'Channel has no videos to reference.') from exc new_ids = ytrss.get_user_videos_since(self.id, most_recent_video) + if not new_ids: + return [] videos = self.ycdldb.youtube.get_videos(new_ids) return videos