New: Implement OnDelete notification for Emby/Jellyfin

(cherry picked from commit a27984c0328210bca4854d1a0926899c3f4361b9)
pull/2605/head
pixxon 3 years ago committed by servarr
parent 6883356e28
commit e67633a8fa

@ -46,6 +46,32 @@ namespace NzbDrone.Core.Notifications.Emby
} }
} }
public override void OnEpisodeFileDelete(EpisodeDeleteMessage deleteMessage)
{
if (Settings.Notify)
{
_mediaBrowserService.Notify(Settings, EPISODE_DELETED_TITLE_BRANDED, deleteMessage.Message);
}
if (Settings.UpdateLibrary)
{
_mediaBrowserService.Update(Settings, deleteMessage.Series, "Deleted");
}
}
public override void OnSeriesDelete(SeriesDeleteMessage deleteMessage)
{
if (Settings.Notify)
{
_mediaBrowserService.Notify(Settings, SERIES_DELETED_TITLE_BRANDED, deleteMessage.Message);
}
if (Settings.UpdateLibrary)
{
_mediaBrowserService.Update(Settings, deleteMessage.Series, "Deleted");
}
}
public override void OnHealthIssue(HealthCheck.HealthCheck message) public override void OnHealthIssue(HealthCheck.HealthCheck message)
{ {
if (Settings.Notify) if (Settings.Notify)

@ -39,7 +39,7 @@ namespace NzbDrone.Core.Notifications.Emby
[FieldDefinition(4, Label = "Send Notifications", HelpText = "Have MediaBrowser send notfications to configured providers", Type = FieldType.Checkbox)] [FieldDefinition(4, Label = "Send Notifications", HelpText = "Have MediaBrowser send notfications to configured providers", Type = FieldType.Checkbox)]
public bool Notify { get; set; } public bool Notify { get; set; }
[FieldDefinition(5, Label = "Update Library", HelpText = "Update Library on Import & Rename?", Type = FieldType.Checkbox)] [FieldDefinition(5, Label = "Update Library", HelpText = "Update Library on Import, Rename, or Delete?", Type = FieldType.Checkbox)]
public bool UpdateLibrary { get; set; } public bool UpdateLibrary { get; set; }
[JsonIgnore] [JsonIgnore]

Loading…
Cancel
Save