update to the process_uploads upload.py and new database table called data
This commit is contained in:
1 parent
afe6490d20
commit
2773200a94
17 files changed
+245
-70
No files matched your search
@@ -1,14 +1,17 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
import package.database as database
|
||||
# Finds the absolute path to 'project_directory' and adds it to Python's search path
|
||||
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "../"))
|
||||
sys.path.append(PROJECT_ROOT)
|
||||
|
||||
# Your original import will now work
|
||||
from package.config import DB as DB
|
||||
|
||||
DB = None
|
||||
|
||||
def remove_files():
|
||||
datas = DB.get_download()
|
||||
|
||||
top_txt = "TeamPGP Live on Twitch...\n Every Friday and Sunday @7:30 ET.\n twitch.tv/teampgp"
|
||||
|
||||
for data in datas:
|
||||
(
|
||||
id,
|
||||
@@ -30,19 +33,20 @@ def remove_files():
|
||||
) = data
|
||||
|
||||
if clip_is == 0:
|
||||
continue
|
||||
video_path = f"download/videos/{id}/{id}.mp4"
|
||||
else:
|
||||
video_path = f"download/clips/{id}/{id}.mp4"
|
||||
|
||||
temp_chat = video_path.replace(".mp4", "_temp_chat.mp4")
|
||||
temp_with_chat = video_path.replace(".mp4", "_temp_with_chat.mp4")
|
||||
video_chat = video_path.replace(".mp4", "_with_chat.mp4")
|
||||
video_chatSS = video_path.replace(".mp4", "_SS_with_chat.mp4")
|
||||
video_chat_over = video_path.replace(".mp4", "_over_with_chat.mp4")
|
||||
mask_path = video_path.replace(".mp4", "_temp_chat_mask.mp4")
|
||||
temp_chat = ""#video_path.replace(".mp4", "_temp_chat.mp4")
|
||||
temp_with_chat = ""#video_path.replace(".mp4", "_temp_with_chat.mp4")
|
||||
video_chat = ""#video_path.replace(".mp4", "_with_chat.mp4")
|
||||
video_chatSS = ""#video_path.replace(".mp4", "_SS_with_chat.mp4")
|
||||
video_chat_over = ""#video_path.replace(".mp4", "_over_with_chat.mp4")
|
||||
mask_path = ""#video_path.replace(".mp4", "_temp_chat_mask.mp4")
|
||||
|
||||
shorts_gaussian_9_16 = ""#video_path.replace(".mp4", "_gaussian_9_16.mp4")
|
||||
shorts_9_16 = ""#video_path.replace(".mp4", "_9_16.mp4")
|
||||
shorts_gaussian_9_16 = video_path.replace(".mp4", "_gaussian_9_16.mp4")
|
||||
shorts_9_16 = video_path.replace(".mp4", "_9_16.mp4")
|
||||
|
||||
srt_file = ""#video_path.replace(".mp4", ".srt")
|
||||
|
||||
@@ -62,11 +66,9 @@ def redownload():
|
||||
|
||||
|
||||
def main():
|
||||
global DB
|
||||
DB = database.Database()
|
||||
|
||||
remove_files()
|
||||
redownload()
|
||||
print("done")
|
||||
#redownload()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user