From f63631df8966a28f195fe6c5ff8e9536e216263f Mon Sep 17 00:00:00 2001 From: chrispr Date: Sat, 28 Sep 2024 13:31:49 -0400 Subject: [PATCH] Fixed bug where Overview wouldn't be included in mastodon post --- AnimeAnnouncer/Program.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AnimeAnnouncer/Program.cs b/AnimeAnnouncer/Program.cs index 3819a9a..95433ed 100644 --- a/AnimeAnnouncer/Program.cs +++ b/AnimeAnnouncer/Program.cs @@ -212,7 +212,12 @@ namespace AnimeAnnouncer attachment = await mastodonClient.UploadMedia(postMedia); } //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) { statusText = statusText[..497] + "..";