"Fix reference bug in video asset downloader

Updated 'asset_name' to 'filename' in downloader.py. The downloader was using the incorrect variable 'asset_name', causing failed video asset downloads. Correcting to 'filename' allows for accurate md5 check and download."
This commit is contained in:
SkalskiP committed 2023-10-24 14:21:58 +02:00
1 parent 7715ef2a17
commit a36abd4297
1 file changed
+2 -2
+2 -2
View File
@@ -79,10 +79,10 @@ def download_assets(asset_name: Union[VideoAssets, str]) -> str:
copyfileobj(r_raw, f)
elif path_exists(filename):
if not is_md5_hash_matching(filename, VIDEO_ASSETS[asset_name][2]):
if not is_md5_hash_matching(filename, VIDEO_ASSETS[filename][2]):
print("File corrupted. Re-downloading... \n")
os_remove(filename)
download_assets(asset_name)
download_assets(filename)
print(f"{filename} asset download complete. \n")
else: