Skip to content

Commit

Permalink
[mastodon] fix reblogs (#4580)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Nov 10, 2023
1 parent 7a0f145 commit 4288cea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gallery_dl/extractor/mastodon.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def items(self):
attachments = status["media_attachments"]
del status["media_attachments"]

if status["reblog"]:
attachments.extend(status["reblog"]["media_attachments"])

status["instance"] = self.instance
acct = status["account"]["acct"]
status["instance_remote"] = \
Expand Down Expand Up @@ -113,7 +116,10 @@ def statuses(self):

return api.account_statuses(
api.account_id_by_username(self.item),
only_media=not self.config("text-posts", False),
only_media=(
not self.reblogs and
not self.config("text-posts", False)
),
exclude_replies=not self.replies,
)

Expand Down

0 comments on commit 4288cea

Please sign in to comment.