rearange files and updateing files
This commit is contained in:
1 parent
20acb4bc9f
commit
2de2c461e2
28 files changed
+285
-188
No files matched your search
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
from pathlib import Path
|
||||
|
||||
import package.database as database
|
||||
|
||||
DB = None
|
||||
|
||||
def fix_download():
|
||||
chats = DB.get_undownloaded()
|
||||
#chats = DB.get_clips()
|
||||
|
||||
for chat in chats:
|
||||
(
|
||||
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,
|
||||
) = chat
|
||||
|
||||
if clip_is:
|
||||
file_name = Path(f"download/clips/{id}/{id}.mp4")
|
||||
else:
|
||||
file_name = Path(f"download/videos/{id}/{id}.mp4")
|
||||
|
||||
if file_name.exists():
|
||||
DB.mark_as_downloaded(id)
|
||||
|
||||
|
||||
print("====================================================")
|
||||
print(f"✅ Processing: download Fix.")
|
||||
print("====================================================")
|
||||
|
||||
def main():
|
||||
global DB
|
||||
DB = database.Database()
|
||||
|
||||
fix_download()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user