fix autodelete error on empty download queue

This commit is contained in:
simon 2021-12-18 17:05:49 +07:00
parent 3015e59a29
commit 88ebb6d648
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -794,6 +794,8 @@ class VideoDownloader:
} }
all_to_delete = IndexPaginate("ta_video", data).get_results() all_to_delete = IndexPaginate("ta_video", data).get_results()
all_youtube_ids = [i["youtube_id"] for i in all_to_delete] all_youtube_ids = [i["youtube_id"] for i in all_to_delete]
if not all_youtube_ids:
return
for youtube_id in all_youtube_ids: for youtube_id in all_youtube_ids:
print(f"autodelete {youtube_id}") print(f"autodelete {youtube_id}")