From 2dc364e96aeefe52d8a85d50e5f2b7927f810757 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sun, 28 Mar 2021 14:13:17 +0100 Subject: [PATCH] Fixed the Discord TV notification not working after moving away from TV maze #4120 --- .../NotificationMessageCurlys.cs | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/Ombi.Notifications/NotificationMessageCurlys.cs b/src/Ombi.Notifications/NotificationMessageCurlys.cs index 54e85080b..3b6263fb6 100644 --- a/src/Ombi.Notifications/NotificationMessageCurlys.cs +++ b/src/Ombi.Notifications/NotificationMessageCurlys.cs @@ -58,15 +58,10 @@ namespace Ombi.Notifications Year = req?.ReleaseDate.Year.ToString(); DenyReason = req?.DeniedReason; AvailableDate = req?.MarkedAsAvailable?.ToString("D") ?? string.Empty; - if (req?.RequestType == RequestType.Movie) - { - PosterImage = string.Format((req?.PosterPath ?? string.Empty).StartsWith("/", StringComparison.InvariantCultureIgnoreCase) - ? "https://image.tmdb.org/t/p/w300{0}" : "https://image.tmdb.org/t/p/w300/{0}", req?.PosterPath); - } - else - { - PosterImage = req?.PosterPath; - } + + PosterImage = string.Format((req?.PosterPath ?? string.Empty).StartsWith("/", StringComparison.InvariantCultureIgnoreCase) + ? "https://image.tmdb.org/t/p/w300{0}" : "https://image.tmdb.org/t/p/w300/{0}", req?.PosterPath); + AdditionalInformation = opts?.AdditionalInformation ?? string.Empty; @@ -168,15 +163,10 @@ namespace Ombi.Notifications Overview = req?.ParentRequest.Overview; Year = req?.ParentRequest.ReleaseDate.Year.ToString(); - if (req?.RequestType == RequestType.Movie) - { - PosterImage = string.Format((req?.ParentRequest.PosterPath ?? string.Empty).StartsWith("/", StringComparison.InvariantCultureIgnoreCase) - ? "https://image.tmdb.org/t/p/w300{0}" : "https://image.tmdb.org/t/p/w300/{0}", req?.ParentRequest.PosterPath); - } - else - { - PosterImage = req?.ParentRequest.PosterPath; - } + + PosterImage = string.Format((req?.ParentRequest.PosterPath ?? string.Empty).StartsWith("/", StringComparison.InvariantCultureIgnoreCase) + ? "https://image.tmdb.org/t/p/w300{0}" : "https://image.tmdb.org/t/p/w300/{0}", req?.ParentRequest.PosterPath); + AdditionalInformation = opts.AdditionalInformation; // DO Episode and Season Lists