Fix automark:download by marking state after calling download.

The previous order of operations was wrongly triggering the
"video already downloaded" check in ycdldb.
This commit is contained in:
voussoir 2020-06-17 15:54:59 -07:00
parent f1e80dac94
commit e3abf5f39d

View file

@ -38,9 +38,9 @@ class Channel(Base):
video = status['video']
if status['new'] and self.automark not in [None, "pending"]:
video.mark_state(self.automark, commit=False)
if self.automark == 'downloaded':
self.ycdldb.download_video(video.id, commit=False)
video.mark_state(self.automark, commit=False)
if not force and not status['new']:
break