Fixed bug where Overview wouldn't be included in mastodon post

This commit is contained in:
2024-09-28 13:31:49 -04:00
parent 9ffe32447a
commit f63631df89

View File

@@ -212,7 +212,12 @@ namespace AnimeAnnouncer
attachment = await mastodonClient.UploadMedia(postMedia); attachment = await mastodonClient.UploadMedia(postMedia);
} }
//Prepare Status //Prepare Status
String statusText = $"{cachedShow.Title} has finished airing season {cachedShow.LatestSeasonNumber}! Episode {cachedShow.LastEpisodeNumber} is now available for download. {Environment.NewLine + Environment.NewLine}Overview: {cachedShow.LatestSeasonOverview ?? cachedShow.Overview}"; String statusText = $"{cachedShow.Title} ({cachedShow.VoteAverage}/10) DUBBED has finished airing season {cachedShow.LatestSeasonNumber}! Episode {cachedShow.LastEpisodeNumber} is now available for download. {Environment.NewLine + Environment.NewLine}";
String overview = !String.IsNullOrWhiteSpace(cachedShow.LatestSeasonOverview) ? cachedShow.LatestSeasonOverview : cachedShow.Overview;
if(!String.IsNullOrWhiteSpace(overview))
{
statusText += $"Overview: {overview}";
}
if(statusText.Length >= 500) if(statusText.Length >= 500)
{ {
statusText = statusText[..497] + ".."; statusText = statusText[..497] + "..";