mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-04 21:16:07 -04:00
Added playback of audio and video attachments in toots
This commit is contained in:
@@ -33,4 +33,11 @@ def is_image(toot):
|
||||
# Checks firstly for Mastodon native videos and audios.
|
||||
for media in toot.media_attachments:
|
||||
if media["type"] == "gifv" or media["type"] == "image":
|
||||
return True
|
||||
return True
|
||||
|
||||
def get_media_urls(toot):
|
||||
urls = []
|
||||
for media in toot.media_attachments:
|
||||
if media.get("type") == "audio" or media.get("type") == "video":
|
||||
urls.append(media.get("url"))
|
||||
return urls
|
Reference in New Issue
Block a user