Skip to content

Commit

Permalink
skip video embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
zWolfrost committed Jan 15, 2025
1 parent 4cf3493 commit 70964a5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions gallery_dl/extractor/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ def extract_default_message(self, message):

all_files = []

for embed in message["embeds"]:
if embed["type"] in ("image", "video", "gifv"):
embed["from"] = "embed"
if embed["type"] == "gifv":
embed["url"] = embed["video"]["url"]
all_files.append(embed)

for attachment in message["attachments"]:
attachment["from"] = "attachment"
all_files.append(attachment)

for embed in message["embeds"]:
if embed["type"] == "gifv":
embed["url"] = embed["video"]["url"]
if embed["type"] in ("image", "gifv"):
embed["from"] = "embed"
all_files.append(embed)

for num, file in enumerate(all_files, start=1):
parsed_file = {
**message_metadata,
Expand Down

0 comments on commit 70964a5

Please sign in to comment.