diff --git a/DiscordChatExporter.Cli.Tests/Specs/HtmlEmbedSpecs.cs b/DiscordChatExporter.Cli.Tests/Specs/HtmlEmbedSpecs.cs index 765bc52d..9de8c0b9 100644 --- a/DiscordChatExporter.Cli.Tests/Specs/HtmlEmbedSpecs.cs +++ b/DiscordChatExporter.Cli.Tests/Specs/HtmlEmbedSpecs.cs @@ -150,7 +150,7 @@ public class HtmlEmbedSpecs iframeUrl.Should().StartWith("https://open.spotify.com/embed/track/1LHZMWefF9502NPfArRfvP"); } - [Fact] + [Fact(Skip = "Twitch does not allow embeds from inside local HTML files")] public async Task I_can_export_a_channel_that_contains_a_message_with_a_Twitch_clip_embed() { // https://github.com/Tyrrrz/DiscordChatExporter/issues/1196 diff --git a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml index 45f47386..e0730553 100644 --- a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml +++ b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml @@ -365,15 +365,6 @@ } - // Twitch embed - else if (embed.TryGetTwitchClip() is { } twitchClipEmbed) - { -
- } // YouTube embed else if (embed.TryGetYouTubeVideo() is { } youTubeVideoEmbed) { @@ -457,7 +448,10 @@ } // Generic video embed - else if (embed.Kind == EmbedKind.Video && !string.IsNullOrWhiteSpace(embed.Url)) + else if (embed.Kind == EmbedKind.Video + && !string.IsNullOrWhiteSpace(embed.Url) + // Twitch clips cannot be embedded in local HTML files + && embed.TryGetTwitchClip() is null) { var embedVideoUrl = embed.Video?.ProxyUrl ?? embed.Video?.Url ??