1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-28 08:58:41 +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 @@ public override void OnGrab(GrabMessage message)
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 @@ public override void OnDownload(DownloadMessage message)
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 @@ public override void OnImportComplete(ImportCompleteMessage message)
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 @@ public override void OnManualInteractionRequired(ManualInteractionRequiredMessag
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";