mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
New: Support On Delete Notifications for Emby
This commit is contained in:
parent
6a8f6dc5f7
commit
e7ff13085e
@ -55,6 +55,35 @@ public override void OnHealthIssue(HealthCheck.HealthCheck message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 @@ public MediaBrowserSettings()
|
|||||||
[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…
Reference in New Issue
Block a user