Skip to content

Commit

Permalink
merge #5516: [mastodon] send canonical 'true'/'false' boolean values
Browse files Browse the repository at this point in the history
instead of '1'/'0' to be compatible with Mitra instances or others that
do not fully implement Mastodon's boolean value semantics.
  • Loading branch information
mikf committed Apr 26, 2024
2 parents 6c57958 + 3ba5fd9 commit 7fd31aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gallery_dl/extractor/mastodon.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ def account_statuses(self, account_id, only_media=True,
exclude_replies=False):
"""Fetch an account's statuses"""
endpoint = "/v1/accounts/{}/statuses".format(account_id)
params = {"only_media" : "1" if only_media else "0",
"exclude_replies": "1" if exclude_replies else "0"}
params = {"only_media" : "true" if only_media else "false",
"exclude_replies": "true" if exclude_replies else "false"}
return self._pagination(endpoint, params)

def status(self, status_id):
Expand Down

0 comments on commit 7fd31aa

Please sign in to comment.