1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-25 11:13:39 +02:00

Fixed: Switch to series rating for Discord notifications

This commit is contained in:
Bogdan 2024-08-16 18:47:49 +03:00 committed by Mark McDowall
parent e92a67ad78
commit ee69351733

View File

@ -77,7 +77,7 @@ namespace NzbDrone.Core.Notifications.Discord
break;
case DiscordGrabFieldType.Rating:
discordField.Name = "Rating";
discordField.Value = episodes.First().Ratings.Value.ToString();
discordField.Value = series.Ratings.Value.ToString(CultureInfo.InvariantCulture);
break;
case DiscordGrabFieldType.Genres:
discordField.Name = "Genres";
@ -180,7 +180,7 @@ namespace NzbDrone.Core.Notifications.Discord
break;
case DiscordImportFieldType.Rating:
discordField.Name = "Rating";
discordField.Value = episodes.First().Ratings.Value.ToString();
discordField.Value = series.Ratings.Value.ToString(CultureInfo.InvariantCulture);
break;
case DiscordImportFieldType.Genres:
discordField.Name = "Genres";
@ -286,7 +286,7 @@ namespace NzbDrone.Core.Notifications.Discord
break;
case DiscordImportFieldType.Rating:
discordField.Name = "Rating";
discordField.Value = episodes.First().Ratings.Value.ToString();
discordField.Value = series.Ratings.Value.ToString(CultureInfo.InvariantCulture);
break;
case DiscordImportFieldType.Genres:
discordField.Name = "Genres";
@ -571,7 +571,7 @@ namespace NzbDrone.Core.Notifications.Discord
break;
case DiscordManualInteractionFieldType.Rating:
discordField.Name = "Rating";
discordField.Value = episodes.FirstOrDefault()?.Ratings?.Value.ToString(CultureInfo.InvariantCulture);
discordField.Value = series?.Ratings?.Value.ToString(CultureInfo.InvariantCulture);
break;
case DiscordManualInteractionFieldType.Genres:
discordField.Name = "Genres";