Add rss_assisted parameter to Channel.refresh too.

This commit is contained in:
voussoir 2020-11-10 17:15:19 -08:00
parent 11414b4088
commit 648d2af560

View file

@ -60,14 +60,14 @@ class Channel(Base):
bindings = [self.id] bindings = [self.id]
return self.ycdldb.sql_select_one(query, bindings) is not None return self.ycdldb.sql_select_one(query, bindings) is not None
def refresh(self, force=False, commit=True): def refresh(self, *, force=False, rss_assisted=True, commit=True):
self.ycdldb.log.debug('Refreshing %s.', self.id) self.ycdldb.log.debug('Refreshing %s.', self.id)
if not self.uploads_playlist: if not self.uploads_playlist:
self.uploads_playlist = self.ycdldb.youtube.get_user_uploads_playlist_id(self.id) self.uploads_playlist = self.ycdldb.youtube.get_user_uploads_playlist_id(self.id)
self.set_uploads_playlist_id(self.uploads_playlist) self.set_uploads_playlist_id(self.uploads_playlist)
if force: if force or not rss_assisted:
video_generator = self.ycdldb.youtube.get_playlist_videos(self.uploads_playlist) video_generator = self.ycdldb.youtube.get_playlist_videos(self.uploads_playlist)
else: else:
try: try: