New: Implement OnDelete notification for Emby/Jellyfin

Closes #4743
This commit is contained in:
pixxon 2021-11-29 20:43:50 +01:00 committed by Mark McDowall
parent 9afcec8b1f
commit a27984c032
2 changed files with 27 additions and 1 deletions

View File

@ -48,6 +48,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)
{
if (Settings.Notify)

View File

@ -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)]
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; }
[JsonIgnore]