url issue
Browse files- App/Worker.py +3 -2
App/Worker.py
CHANGED
@@ -110,7 +110,8 @@ def create_symlink(source_dir, target_dir, symlink_name):
|
|
110 |
|
111 |
def download_with_wget(link, download_dir, filename):
|
112 |
print(["aria2c", link, "-d", download_dir, "-o", filename])
|
113 |
-
|
|
|
114 |
|
115 |
|
116 |
# @celery.task(name="CopyRemotion")
|
@@ -168,7 +169,7 @@ def upload_video_to_youtube(task_data: dict):
|
|
168 |
def download_assets(links: List[LinkInfo], temp_dir: str):
|
169 |
public_dir = f"{temp_dir}/public"
|
170 |
for link in links:
|
171 |
-
file_link = link.link
|
172 |
file_name = link.file_name
|
173 |
download_with_wget(file_link, public_dir, file_name)
|
174 |
|
|
|
110 |
|
111 |
def download_with_wget(link, download_dir, filename):
|
112 |
print(["aria2c", link, "-d", download_dir, "-o", filename])
|
113 |
+
subprocess.run(["aria2c", link, "-d", download_dir, "-o", filename])
|
114 |
+
# os.system(f"aria2c {link} -d {download_dir} -o {filename}")
|
115 |
|
116 |
|
117 |
# @celery.task(name="CopyRemotion")
|
|
|
169 |
def download_assets(links: List[LinkInfo], temp_dir: str):
|
170 |
public_dir = f"{temp_dir}/public"
|
171 |
for link in links:
|
172 |
+
file_link = str(link.link)
|
173 |
file_name = link.file_name
|
174 |
download_with_wget(file_link, public_dir, file_name)
|
175 |
|