database , chat vod and shorts update error messages

This commit is contained in:
2026-07-31 16:56:40 +00:00
parent 736fb47e7a
commit d6503b7d92
5 changed files with 22 additions and 8 deletions
+4 -4
View File
@@ -80,18 +80,18 @@ class Database:
"""Flags a specific row record to downloaded (0)."""
self.__mark_as(record_id, "downloaded", "0")
def __get_unuploaded(self, set_row: str) -> list[Any]:
def __get_unuploaded(self, set_row: str, also: str = "") -> list[Any]:
"""Retrieve all rows that were download but not uploaded"""
self.cursor.execute(f"SELECT {self.columns} FROM twitch_videos WHERE downloaded = 1 AND {set_row} = 0")
self.cursor.execute(f"SELECT {self.columns} FROM twitch_videos WHERE downloaded = 1 AND {set_row} = 0 {also}")
return self.cursor.fetchall()
def get_unuploaded_shorts(self) -> list[Any]:
"""Retrieve all rows that were download but not uploaded_yt_shorts"""
return self.__get_unuploaded("uploaded_yt_shorts")
return self.__get_unuploaded("uploaded_yt_shorts", "AND clip_is = 1")
def get_unuploaded_chats(self) -> list[Any]:
"""Retrieve all rows that were download but not uploaded_yt_chats"""
return self.__get_unuploaded("uploaded_yt_chats")
return self.__get_unuploaded("uploaded_yt_chats", "AND clips_is = 0")
def get_unuploaded(self) -> list[Any]:
"""Retrieve all rows that were download but not uploaded_yt"""