mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-10-24 00:38:40 -04:00
Fix notifications when poster is not found (#89)
This commit is contained in:
1 parent
324c3ace8f
commit
a68e13af35
1 file changed
+3
-3
@@ -128,9 +128,9 @@ public class NotificationPublisher : INotificationPublisher
|
||||
{
|
||||
Uri? image = instanceType switch
|
||||
{
|
||||
InstanceType.Sonarr => record.Series!.Images.FirstOrDefault(x => x.CoverType == "poster")?.RemoteUrl,
|
||||
InstanceType.Radarr => record.Movie!.Images.FirstOrDefault(x => x.CoverType == "poster")?.RemoteUrl,
|
||||
InstanceType.Lidarr => record.Album!.Images.FirstOrDefault(x => x.CoverType == "cover")?.Url,
|
||||
InstanceType.Sonarr => record.Series?.Images?.FirstOrDefault(x => x.CoverType == "poster")?.RemoteUrl,
|
||||
InstanceType.Radarr => record.Movie?.Images?.FirstOrDefault(x => x.CoverType == "poster")?.RemoteUrl,
|
||||
InstanceType.Lidarr => record.Album?.Images?.FirstOrDefault(x => x.CoverType == "cover")?.Url,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(instanceType))
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user