Skip to content

Commit

Permalink
removed unnecessary dict unpacking
Browse files Browse the repository at this point in the history
  • Loading branch information
zWolfrost committed Jan 24, 2025
1 parent 297ab99 commit 2575b66
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions gallery_dl/extractor/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,23 +146,21 @@ def parse_channel(self, channel_id):
parent_channel_metadata = (
self.all_channels_metadata[channel_metadata["parent_id"]]
)
channel_metadata = {
**channel_metadata,
channel_metadata.update({
"parent": parent_channel_metadata["channel"],
"parent_type": parent_channel_metadata["channel_type"]
}
})

if channel_metadata["channel_type"] in (1, 3):
channel_metadata = {
**channel_metadata,
channel_metadata.update({
"channel": "DMs",
"recipients": (
[user["username"] for user in channel["recipients"]]
),
"recipients_id": (
[user["id"] for user in channel["recipients"]]
),
"channel": "DMs"
}
)
})

self.all_channels_metadata[channel_id] = {
**self.server_metadata,
Expand Down

0 comments on commit 2575b66

Please sign in to comment.