diff --git a/Wasari.App/NotificationService.cs b/Wasari.App/NotificationService.cs index b089cac..93ca036 100644 --- a/Wasari.App/NotificationService.cs +++ b/Wasari.App/NotificationService.cs @@ -12,15 +12,19 @@ public NotificationService(HttpClient httpClient) } private HttpClient HttpClient { get; } - + public async ValueTask SendNotifcationForDownloadedEpisodeAsync(IEnumerable downloadedEpisode) { var message = downloadedEpisode - .GroupBy(i => i.Episode.SeriesName) + .GroupBy(i => new { i.Episode.SeriesName, i.Success }) .Select(i => { var sb = new StringBuilder(); - sb.AppendLine($"Episodes has been downloaded for series: {i.Key}"); + + if (i.Key.Success) + sb.AppendLine($"Episodes has been downloaded for series: {i.Key.SeriesName}"); + else + sb.AppendLine($"Failed to download episodes for series: {i.Key.SeriesName}"); foreach (var episode in i) { @@ -33,7 +37,7 @@ public async ValueTask SendNotifcationForDownloadedEpisodeAsync(IEnumerable