Don't bother calling ytapi.get_videos if no new ids from RSS.

This commit is contained in:
voussoir 2021-10-31 12:51:17 -07:00
parent 2efc5ed38d
commit a03ee5de90
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -118,6 +118,8 @@ class Channel(ObjectBase):
except exceptions.NoVideos as exc: except exceptions.NoVideos as exc:
raise exceptions.RSSAssistFailed(f'Channel has no videos to reference.') from 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) 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) videos = self.ycdldb.youtube.get_videos(new_ids)
return videos return videos