New: Health Check Failure Notifications (#609)

* New: Health Check Failure Notifications

Fixes #295

* New: OnDownloadFailure and OnImportFailure Notification

* New: On Retag notifications

* Fixed: XBMC notification test

* New: Discord Notifications

Closes #1511

* On Download to On Import on card

* Remove OnDownload, Rename OnAlbumDownload -> OnReleaseImported

* Fixed: Webhook OnReleaseImport notification

* Respect OnUpgrade and fix missing schema items for frontend

* New: Simplify Notification Modal UI

* Fixed: PlexHomeTheater OnReleaseImport notification
This commit is contained in:
Qstick
2019-03-21 20:47:54 -04:00
committed by GitHub
parent 4d8bcd12e3
commit d4d9146599
52 changed files with 1262 additions and 427 deletions

View File

@@ -6,15 +6,22 @@ namespace Lidarr.Api.V1.Notifications
{
public string Link { get; set; }
public bool OnGrab { get; set; }
public bool OnDownload { get; set; }
public bool OnAlbumDownload { get; set; }
public bool OnReleaseImport { get; set; }
public bool OnUpgrade { get; set; }
public bool OnRename { get; set; }
public bool OnHealthIssue { get; set; }
public bool OnDownloadFailure { get; set; }
public bool OnImportFailure { get; set; }
public bool OnTrackRetag { get; set; }
public bool SupportsOnGrab { get; set; }
public bool SupportsOnDownload { get; set; }
public bool SupportsOnAlbumDownload { get; set; }
public bool SupportsOnReleaseImport { get; set; }
public bool SupportsOnUpgrade { get; set; }
public bool SupportsOnRename { get; set; }
public bool SupportsOnHealthIssue { get; set; }
public bool IncludeHealthWarnings { get; set; }
public bool SupportsOnDownloadFailure { get; set; }
public bool SupportsOnImportFailure { get; set; }
public bool SupportsOnTrackRetag { get; set; }
public string TestCommand { get; set; }
}
@@ -27,15 +34,22 @@ namespace Lidarr.Api.V1.Notifications
var resource = base.ToResource(definition);
resource.OnGrab = definition.OnGrab;
resource.OnDownload = definition.OnDownload;
resource.OnAlbumDownload = definition.OnAlbumDownload;
resource.OnReleaseImport = definition.OnReleaseImport;
resource.OnUpgrade = definition.OnUpgrade;
resource.OnRename = definition.OnRename;
resource.OnHealthIssue = definition.OnHealthIssue;
resource.OnDownloadFailure = definition.OnDownloadFailure;
resource.OnImportFailure = definition.OnImportFailure;
resource.OnTrackRetag = definition.OnTrackRetag;
resource.SupportsOnGrab = definition.SupportsOnGrab;
resource.SupportsOnDownload = definition.SupportsOnDownload;
resource.SupportsOnAlbumDownload = definition.SupportsOnAlbumDownload;
resource.SupportsOnReleaseImport = definition.SupportsOnReleaseImport;
resource.SupportsOnUpgrade = definition.SupportsOnUpgrade;
resource.SupportsOnRename = definition.SupportsOnRename;
resource.SupportsOnHealthIssue = definition.SupportsOnHealthIssue;
resource.IncludeHealthWarnings = definition.IncludeHealthWarnings;
resource.SupportsOnDownloadFailure = definition.SupportsOnDownloadFailure;
resource.SupportsOnImportFailure = definition.SupportsOnImportFailure;
resource.SupportsOnTrackRetag = definition.SupportsOnTrackRetag;
return resource;
}
@@ -47,15 +61,22 @@ namespace Lidarr.Api.V1.Notifications
var definition = base.ToModel(resource);
definition.OnGrab = resource.OnGrab;
definition.OnDownload = resource.OnDownload;
definition.OnAlbumDownload = resource.OnAlbumDownload;
definition.OnReleaseImport = resource.OnReleaseImport;
definition.OnUpgrade = resource.OnUpgrade;
definition.OnRename = resource.OnRename;
definition.OnHealthIssue = resource.OnHealthIssue;
definition.OnDownloadFailure = resource.OnDownloadFailure;
definition.OnImportFailure = resource.OnImportFailure;
definition.OnTrackRetag = resource.OnTrackRetag;
definition.SupportsOnGrab = resource.SupportsOnGrab;
definition.SupportsOnDownload = resource.SupportsOnDownload;
definition.SupportsOnAlbumDownload = resource.SupportsOnAlbumDownload;
definition.SupportsOnReleaseImport = resource.SupportsOnReleaseImport;
definition.SupportsOnUpgrade = resource.SupportsOnUpgrade;
definition.SupportsOnRename = resource.SupportsOnRename;
definition.SupportsOnHealthIssue = resource.SupportsOnHealthIssue;
definition.IncludeHealthWarnings = resource.IncludeHealthWarnings;
definition.SupportsOnDownloadFailure = resource.SupportsOnDownloadFailure;
definition.SupportsOnImportFailure = resource.SupportsOnImportFailure;
definition.SupportsOnTrackRetag = resource.SupportsOnTrackRetag;
return definition;
}