Use mark_state instead of doing the sql update here.

This commit is contained in:
voussoir 2020-04-15 16:34:33 -07:00
parent 2f5ec40b89
commit 0562c51d6c

View file

@ -269,11 +269,7 @@ class YCDLDBVideoMixin:
self.youtube_dl_function(video_id) self.youtube_dl_function(video_id)
os.chdir(current_directory) os.chdir(current_directory)
pairs = { video.mark_state('downloaded', commit=False)
'id': video_id,
'download': 'downloaded',
}
self.sql_update(table='videos', pairs=pairs, where_key='id')
if commit: if commit:
self.commit() self.commit()