Add missing formats to the list of supported image and video attachments

This commit is contained in:
Tyrrrz 2021-07-23 00:18:38 +03:00
parent 38bc259ab6
commit bb4db21b87

View file

@ -57,13 +57,13 @@ namespace DiscordChatExporter.Core.Discord.Data
public partial class Attachment public partial class Attachment
{ {
private static readonly HashSet<string> ImageFileExtensions = new(StringComparer.OrdinalIgnoreCase) private static readonly HashSet<string> ImageFileExtensions = new(StringComparer.OrdinalIgnoreCase)
{".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp"}; { ".jpg", ".jpeg", ".png", ".gif", ".gifv", ".bmp", ".webp" };
private static readonly HashSet<string> VideoFileExtensions = new(StringComparer.OrdinalIgnoreCase) private static readonly HashSet<string> VideoFileExtensions = new(StringComparer.OrdinalIgnoreCase)
{".mp4", ".webm"}; { ".mp4", ".webm", ".mov" };
private static readonly HashSet<string> AudioFileExtensions = new(StringComparer.OrdinalIgnoreCase) private static readonly HashSet<string> AudioFileExtensions = new(StringComparer.OrdinalIgnoreCase)
{".mp3", ".wav", ".ogg", ".flac", ".m4a"}; { ".mp3", ".wav", ".ogg", ".flac", ".m4a" };
public static Attachment Parse(JsonElement json) public static Attachment Parse(JsonElement json)
{ {