New: Implement OnDelete notification for Emby/Jellyfin

(cherry picked from commit a27984c0328210bca4854d1a0926899c3f4361b9)
This commit is contained in:
pixxon 2021-11-29 20:43:50 +01:00 committed by servarr
parent 6883356e28
commit e67633a8fa
2 changed files with 27 additions and 1 deletions

View File

@ -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)
{
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]