mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-02 21:15:05 +00:00
New: Implement OnDelete notification for Emby/Jellyfin
(cherry picked from commit a27984c0328210bca4854d1a0926899c3f4361b9)
This commit is contained in:
parent
6883356e28
commit
e67633a8fa
2 changed files with 27 additions and 1 deletions
|
@ -46,6 +46,32 @@ public override void OnRename(Artist artist)
|
|||
}
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
|
@ -39,7 +39,7 @@ public MediaBrowserSettings()
|
|||
[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]
|
||||
|
|
Loading…
Reference in a new issue