New: Support On Delete Notifications for Emby

pull/6564/head
Robin Dadswell 3 years ago
parent 6a8f6dc5f7
commit e7ff13085e

@ -55,6 +55,35 @@ namespace NzbDrone.Core.Notifications.Emby
} }
} }
public override void OnMovieDelete(MovieDeleteMessage deleteMessage)
{
if (deleteMessage.DeletedFiles)
{
if (Settings.Notify)
{
_mediaBrowserService.Notify(Settings, MOVIE_DELETED_TITLE_BRANDED, deleteMessage.Message);
}
if (Settings.UpdateLibrary)
{
_mediaBrowserService.UpdateMovies(Settings, deleteMessage.Movie, "Deleted");
}
}
}
public override void OnMovieFileDelete(MovieFileDeleteMessage deleteMessage)
{
if (Settings.Notify)
{
_mediaBrowserService.Notify(Settings, MOVIE_FILE_DELETED_TITLE_BRANDED, deleteMessage.Message);
}
if (Settings.UpdateLibrary)
{
_mediaBrowserService.UpdateMovies(Settings, deleteMessage.Movie, "Deleted");
}
}
public override ValidationResult Test() public override ValidationResult Test()
{ {
var failures = new List<ValidationFailure>(); var failures = new List<ValidationFailure>();

@ -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