From dd55833108ba212b5d4530a8f648d4c7f40c0230 Mon Sep 17 00:00:00 2001 From: Laurence0x03 Date: Sun, 19 Nov 2023 06:57:58 +1000 Subject: [PATCH] Handle both types of linebreaks Fixes #54 --- Livestream.Monitor/Model/ApiClients/TwitchApiClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Livestream.Monitor/Model/ApiClients/TwitchApiClient.cs b/Livestream.Monitor/Model/ApiClients/TwitchApiClient.cs index 57c5d52..9d5596a 100644 --- a/Livestream.Monitor/Model/ApiClients/TwitchApiClient.cs +++ b/Livestream.Monitor/Model/ApiClients/TwitchApiClient.cs @@ -277,8 +277,8 @@ public async Task> GetVods(VodQuery vodQuery) var secs = match.Groups["secs"].Value; var timespan = new TimeSpan(hours.ToInt(), mins.ToInt(), secs.ToInt()); - var singleLineTitle = video.Title.TrimEnd().Replace('\n', ' '); - var singleLineDesc = video.Description.TrimEnd().Replace('\n', ' '); + var singleLineTitle = video.Title.TrimEnd().Replace("\r\n", " ").Replace('\n', ' '); + var singleLineDesc = video.Description.TrimEnd().Replace("\r\n", " ").Replace('\n', ' '); return new VodDetails {