From 631cbad92a675fb373fefdb921bcfe6e06fb20b5 Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:09:06 -0400 Subject: [PATCH] Fix crash when generating info table for VOD/Clip with square brackets in its name --- TwitchDownloaderCLI/Modes/InfoHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TwitchDownloaderCLI/Modes/InfoHandler.cs b/TwitchDownloaderCLI/Modes/InfoHandler.cs index 4640f913..7c8e2785 100644 --- a/TwitchDownloaderCLI/Modes/InfoHandler.cs +++ b/TwitchDownloaderCLI/Modes/InfoHandler.cs @@ -120,7 +120,7 @@ private static void HandleVodTable(GqlVideoResponse videoInfo, GqlVideoChapterRe .AddColumn(new TableColumn("Key")) .AddColumn(new TableColumn("Value")) .AddRow(new Markup("Streamer"), GetUserNameMarkup(infoVideo.owner.displayName, infoVideo.owner.login, DEFAULT_STRING)) - .AddRow("Title", infoVideo.title) + .AddRow(new Markup("Title"), new Paragraph(infoVideo.title)) .AddRow("Length", StringifyTimestamp(TimeSpan.FromSeconds(infoVideo.lengthSeconds))) .AddRow("Category", infoVideo.game?.displayName ?? DEFAULT_STRING) .AddRow("Views", infoVideo.viewCount.ToString("N0", CultureInfo.CurrentCulture)) @@ -274,7 +274,7 @@ private static void HandleClipTable(GqlClipResponse clipInfo, GqlClipTokenRespon .AddColumn(new TableColumn("Key")) .AddColumn(new TableColumn("Value")) .AddRow(new Markup("Streamer"), GetUserNameMarkup(infoClip.broadcaster?.displayName, infoClip.broadcaster?.login, DEFAULT_STRING)) - .AddRow("Title", infoClip.title) + .AddRow(new Markup("Title"), new Paragraph(infoClip.title)) .AddRow("Length", StringifyTimestamp(TimeSpan.FromSeconds(infoClip.durationSeconds))) .AddRow(new Markup("Clipped by"), GetUserNameMarkup(infoClip.curator?.displayName, infoClip.curator?.login, DEFAULT_STRING)) .AddRow("Category", infoClip.game?.displayName ?? DEFAULT_STRING)