add new files import_vod and move_vod for use on old vods before this program was created
This commit is contained in:
1 parent
7f1f1e7b4f
commit
20acb4bc9f
4 files changed
+190
No files matched your search
+57
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env python3
|
||||
import database
|
||||
from pathlib import Path
|
||||
|
||||
DB = None
|
||||
|
||||
def remove_vods():
|
||||
chats = DB.get_vods()
|
||||
#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
|
||||
|
||||
#shutil.rmtree(f"", ignore_errors=True)
|
||||
|
||||
if clip_is:
|
||||
source = Path(f"../saveoldold/clips/{id}")
|
||||
destination = Path(f"../savedup/clips/{id}")
|
||||
else:
|
||||
source = Path(f"../saveoldold/{id}")
|
||||
destination = Path(f"../savedup/{id}")
|
||||
|
||||
if source.exists() and source.is_dir():
|
||||
source.rename(destination)
|
||||
print("====================================================")
|
||||
print(f"🚀 VOD to remove: {title}")
|
||||
print("====================================================")
|
||||
|
||||
print("====================================================")
|
||||
print(f"✅ Processing: VOD removal Done.")
|
||||
print("====================================================")
|
||||
|
||||
def main():
|
||||
global DB
|
||||
DB = database.Database()
|
||||
|
||||
remove_vods()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user