update database to use sqlalchemy
This commit is contained in:
1 parent
2773200a94
commit
61fe9eca25
9 files changed
+267
-170
No files matched your search
@@ -10,33 +10,15 @@ from package.config import DB as DB
|
||||
|
||||
|
||||
def remove_files():
|
||||
datas = DB.get_download()
|
||||
datas = DB.get_downloaded()
|
||||
|
||||
for data in datas:
|
||||
(
|
||||
id,
|
||||
title,
|
||||
created_at,
|
||||
view_count,
|
||||
duration,
|
||||
url,
|
||||
thumbnail_url,
|
||||
game_id,
|
||||
game_name,
|
||||
stream_id,
|
||||
creator_name,
|
||||
clip_is,
|
||||
downloaded,
|
||||
uploaded_yt,
|
||||
uploaded_yt_chats,
|
||||
uploaded_yt_shorts,
|
||||
) = data
|
||||
|
||||
if clip_is == 0:
|
||||
|
||||
if data.clip_is is False:
|
||||
continue
|
||||
video_path = f"download/videos/{id}/{id}.mp4"
|
||||
video_path = f"download/videos/{data.id}/{data.id}.mp4"
|
||||
else:
|
||||
video_path = f"download/clips/{id}/{id}.mp4"
|
||||
video_path = f"download/clips/{data.id}/{data.id}.mp4"
|
||||
|
||||
temp_chat = ""#video_path.replace(".mp4", "_temp_chat.mp4")
|
||||
temp_with_chat = ""#video_path.replace(".mp4", "_temp_with_chat.mp4")
|
||||
|
||||
Reference in new issue
Block a user