Fix for issue #1085 (#2214)

Implement check for post.mediacount before checking if posts have been downloaded.

---------

Co-authored-by: Alexander Graf <17130992+aandergr@users.noreply.github.com>
This commit is contained in:
Seamus Mullan
2024-07-03 08:19:16 +02:00
committed by GitHub
co-authored by Alexander Graf
parent 36d9f66e8e
commit 66c257362d
+1 -1
View File
@@ -722,7 +722,7 @@ class Instaloader:
# Download the image(s) / video thumbnail and videos within sidecars if desired # Download the image(s) / video thumbnail and videos within sidecars if desired
downloaded = True downloaded = True
if post.typename == 'GraphSidecar': if post.typename == 'GraphSidecar':
if self.download_pictures or self.download_videos: if (self.download_pictures or self.download_videos) and post.mediacount > 0:
if not _all_already_downloaded( if not _all_already_downloaded(
filename_template, enumerate( filename_template, enumerate(
(post.get_is_videos()[i] (post.get_is_videos()[i]