From 0562c51d6cafff1106e77a48272d6df59c398539 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 15 Apr 2020 16:34:33 -0700 Subject: [PATCH] Use mark_state instead of doing the sql update here. --- ycdl/ycdldb.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ycdl/ycdldb.py b/ycdl/ycdldb.py index 76264b5..26f3af2 100644 --- a/ycdl/ycdldb.py +++ b/ycdl/ycdldb.py @@ -269,11 +269,7 @@ class YCDLDBVideoMixin: self.youtube_dl_function(video_id) os.chdir(current_directory) - pairs = { - 'id': video_id, - 'download': 'downloaded', - } - self.sql_update(table='videos', pairs=pairs, where_key='id') + video.mark_state('downloaded', commit=False) if commit: self.commit()