diff --git a/main.py b/main.py index b563636..b2d4449 100755 --- a/main.py +++ b/main.py @@ -37,7 +37,7 @@ async def main(POST_ID=None): cleanup() reddit_object = get_subreddit_threads(POST_ID) comments_created = await save_text_to_mp3(reddit_object) - download_screenshots_of_reddit_posts(reddit_object, comments_created) + await download_screenshots_of_reddit_posts(reddit_object, comments_created) bg_config = get_background_config() make_final_video(comments_created, reddit_object, bg_config) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index c46adba..c4580e9 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -137,13 +137,13 @@ def make_final_video( ) ) - for photo_idx in indexes_for_videos: + for idx, photo_idx in enumerate(indexes_for_videos): image_clips.append( create_image_clip( f'comment_{photo_idx}', - audio_clips[photo_idx].start, - audio_clips[photo_idx].end, - audio_clips[photo_idx].duration + audio_clips[idx + 1].start, + audio_clips[idx + 1].end, + audio_clips[idx + 1].duration ) ) diff --git a/video_creation/screenshot_downloader.py b/video_creation/screenshot_downloader.py index a277cf2..6ceff45 100644 --- a/video_creation/screenshot_downloader.py +++ b/video_creation/screenshot_downloader.py @@ -74,7 +74,7 @@ async def download_screenshots_of_reddit_posts(reddit_object: dict, voiced_idx: ) else: for idx in track( - screenshot_num, + voiced_idx, "Downloading screenshots..." ): comment = reddit_object["comments"][idx]