Skip to content

Commit

Permalink
Remove newlines from twitch vod title/desc
Browse files Browse the repository at this point in the history
Fixes #54
  • Loading branch information
laurencee committed Nov 18, 2023
1 parent ca78850 commit 71d5209
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("2.13.8.0")]
[assembly: AssemblyFileVersion("2.13.8.0")]
[assembly: AssemblyVersion("2.13.9.0")]
[assembly: AssemblyFileVersion("2.13.9.0")]
7 changes: 5 additions & 2 deletions Livestream.Monitor/Model/ApiClients/TwitchApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,18 @@ public async Task<List<VodDetails>> 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', ' ');
return new VodDetails
{
Url = video.Url,
Length = timespan,
RecordedAt = video.CreatedAt,
Views = video.ViewCount,
//Game = video.Game,
Description = video.Description,
Title = video.Title,
Description = singleLineDesc,
Title = singleLineTitle,
PreviewImage = largeThumbnail,
ApiClient = this,
};
Expand Down

0 comments on commit 71d5209

Please sign in to comment.