mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-16 23:39:44 +02:00
parent
4d2a311e40
commit
9e175e28ef
@ -63,6 +63,7 @@ class Notification extends Component {
|
|||||||
onMovieFileDelete,
|
onMovieFileDelete,
|
||||||
onMovieFileDeleteForUpgrade,
|
onMovieFileDeleteForUpgrade,
|
||||||
onHealthIssue,
|
onHealthIssue,
|
||||||
|
onApplicationUpdate,
|
||||||
supportsOnGrab,
|
supportsOnGrab,
|
||||||
supportsOnDownload,
|
supportsOnDownload,
|
||||||
supportsOnUpgrade,
|
supportsOnUpgrade,
|
||||||
@ -70,7 +71,8 @@ class Notification extends Component {
|
|||||||
supportsOnMovieDelete,
|
supportsOnMovieDelete,
|
||||||
supportsOnMovieFileDelete,
|
supportsOnMovieFileDelete,
|
||||||
supportsOnMovieFileDeleteForUpgrade,
|
supportsOnMovieFileDeleteForUpgrade,
|
||||||
supportsOnHealthIssue
|
supportsOnHealthIssue,
|
||||||
|
supportsOnApplicationUpdate
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -123,6 +125,14 @@ class Notification extends Component {
|
|||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
supportsOnApplicationUpdate && onApplicationUpdate ?
|
||||||
|
<Label kind={kinds.SUCCESS}>
|
||||||
|
{translate('onApplicationUpdate')}
|
||||||
|
</Label> :
|
||||||
|
null
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
supportsOnMovieDelete && onMovieDelete ?
|
supportsOnMovieDelete && onMovieDelete ?
|
||||||
<Label kind={kinds.SUCCESS}>
|
<Label kind={kinds.SUCCESS}>
|
||||||
@ -148,7 +158,7 @@ class Notification extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
!onGrab && !onDownload && !onRename && !onHealthIssue && !onMovieDelete && !onMovieFileDelete ?
|
!onGrab && !onDownload && !onRename && !onHealthIssue && !onApplicationUpdate && !onMovieDelete && !onMovieFileDelete ?
|
||||||
<Label
|
<Label
|
||||||
kind={kinds.DISABLED}
|
kind={kinds.DISABLED}
|
||||||
outline={true}
|
outline={true}
|
||||||
@ -190,6 +200,7 @@ Notification.propTypes = {
|
|||||||
onMovieFileDelete: PropTypes.bool.isRequired,
|
onMovieFileDelete: PropTypes.bool.isRequired,
|
||||||
onMovieFileDeleteForUpgrade: PropTypes.bool.isRequired,
|
onMovieFileDeleteForUpgrade: PropTypes.bool.isRequired,
|
||||||
onHealthIssue: PropTypes.bool.isRequired,
|
onHealthIssue: PropTypes.bool.isRequired,
|
||||||
|
onApplicationUpdate: PropTypes.bool.isRequired,
|
||||||
supportsOnGrab: PropTypes.bool.isRequired,
|
supportsOnGrab: PropTypes.bool.isRequired,
|
||||||
supportsOnDownload: PropTypes.bool.isRequired,
|
supportsOnDownload: PropTypes.bool.isRequired,
|
||||||
supportsOnMovieDelete: PropTypes.bool.isRequired,
|
supportsOnMovieDelete: PropTypes.bool.isRequired,
|
||||||
@ -198,6 +209,7 @@ Notification.propTypes = {
|
|||||||
supportsOnUpgrade: PropTypes.bool.isRequired,
|
supportsOnUpgrade: PropTypes.bool.isRequired,
|
||||||
supportsOnRename: PropTypes.bool.isRequired,
|
supportsOnRename: PropTypes.bool.isRequired,
|
||||||
supportsOnHealthIssue: PropTypes.bool.isRequired,
|
supportsOnHealthIssue: PropTypes.bool.isRequired,
|
||||||
|
supportsOnApplicationUpdate: PropTypes.bool.isRequired,
|
||||||
onConfirmDeleteNotification: PropTypes.func.isRequired
|
onConfirmDeleteNotification: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ function NotificationEventItems(props) {
|
|||||||
onMovieFileDelete,
|
onMovieFileDelete,
|
||||||
onMovieFileDeleteForUpgrade,
|
onMovieFileDeleteForUpgrade,
|
||||||
onHealthIssue,
|
onHealthIssue,
|
||||||
|
onApplicationUpdate,
|
||||||
supportsOnGrab,
|
supportsOnGrab,
|
||||||
supportsOnDownload,
|
supportsOnDownload,
|
||||||
supportsOnUpgrade,
|
supportsOnUpgrade,
|
||||||
@ -30,6 +31,7 @@ function NotificationEventItems(props) {
|
|||||||
supportsOnMovieDelete,
|
supportsOnMovieDelete,
|
||||||
supportsOnMovieFileDelete,
|
supportsOnMovieFileDelete,
|
||||||
supportsOnMovieFileDeleteForUpgrade,
|
supportsOnMovieFileDeleteForUpgrade,
|
||||||
|
supportsOnApplicationUpdate,
|
||||||
supportsOnHealthIssue,
|
supportsOnHealthIssue,
|
||||||
includeHealthWarnings
|
includeHealthWarnings
|
||||||
} = item;
|
} = item;
|
||||||
@ -150,6 +152,17 @@ function NotificationEventItems(props) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<FormInputGroup
|
||||||
|
type={inputTypes.CHECK}
|
||||||
|
name="onApplicationUpdate"
|
||||||
|
helpText={translate('OnApplicationUpdateHelpText')}
|
||||||
|
isDisabled={!supportsOnApplicationUpdate.value}
|
||||||
|
{...onApplicationUpdate}
|
||||||
|
onChange={onInputChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
@ -109,6 +109,7 @@ export default {
|
|||||||
selectedSchema.onMovieDelete = selectedSchema.supportsOnMovieDelete;
|
selectedSchema.onMovieDelete = selectedSchema.supportsOnMovieDelete;
|
||||||
selectedSchema.onMovieFileDelete = selectedSchema.supportsOnMovieFileDelete;
|
selectedSchema.onMovieFileDelete = selectedSchema.supportsOnMovieFileDelete;
|
||||||
selectedSchema.onMovieFileDeleteForUpgrade = selectedSchema.supportsOnMovieFileDeleteForUpgrade;
|
selectedSchema.onMovieFileDeleteForUpgrade = selectedSchema.supportsOnMovieFileDeleteForUpgrade;
|
||||||
|
selectedSchema.onApplicationUpdate = selectedSchema.supportsOnApplicationUpdate;
|
||||||
|
|
||||||
return selectedSchema;
|
return selectedSchema;
|
||||||
});
|
});
|
||||||
|
@ -78,6 +78,11 @@ public override void OnHealthIssue(NzbDrone.Core.HealthCheck.HealthCheck artist)
|
|||||||
{
|
{
|
||||||
TestLogger.Info("OnHealthIssue was called");
|
TestLogger.Info("OnHealthIssue was called");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
TestLogger.Info("OnApplicationUpdate was called");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestNotificationWithNoEvents : NotificationBase<TestSetting>
|
private class TestNotificationWithNoEvents : NotificationBase<TestSetting>
|
||||||
@ -116,6 +121,7 @@ public void should_support_all_if_implemented()
|
|||||||
notification.SupportsOnMovieFileDelete.Should().BeTrue();
|
notification.SupportsOnMovieFileDelete.Should().BeTrue();
|
||||||
notification.SupportsOnMovieFileDeleteForUpgrade.Should().BeTrue();
|
notification.SupportsOnMovieFileDeleteForUpgrade.Should().BeTrue();
|
||||||
notification.SupportsOnHealthIssue.Should().BeTrue();
|
notification.SupportsOnHealthIssue.Should().BeTrue();
|
||||||
|
notification.SupportsOnApplicationUpdate.Should().BeTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -131,6 +137,7 @@ public void should_support_none_if_none_are_implemented()
|
|||||||
notification.SupportsOnMovieFileDelete.Should().BeFalse();
|
notification.SupportsOnMovieFileDelete.Should().BeFalse();
|
||||||
notification.SupportsOnMovieFileDeleteForUpgrade.Should().BeFalse();
|
notification.SupportsOnMovieFileDeleteForUpgrade.Should().BeFalse();
|
||||||
notification.SupportsOnHealthIssue.Should().BeFalse();
|
notification.SupportsOnHealthIssue.Should().BeFalse();
|
||||||
|
notification.SupportsOnApplicationUpdate.Should().BeFalse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
using FluentMigrator;
|
||||||
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Datastore.Migration
|
||||||
|
{
|
||||||
|
[Migration(203)]
|
||||||
|
public class add_on_update_to_notifications : NzbDroneMigrationBase
|
||||||
|
{
|
||||||
|
protected override void MainDbUpgrade()
|
||||||
|
{
|
||||||
|
Alter.Table("Notifications").AddColumn("OnApplicationUpdate").AsBoolean().WithDefaultValue(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -89,7 +89,8 @@ public static void Map()
|
|||||||
.Ignore(i => i.SupportsOnMovieDelete)
|
.Ignore(i => i.SupportsOnMovieDelete)
|
||||||
.Ignore(i => i.SupportsOnMovieFileDelete)
|
.Ignore(i => i.SupportsOnMovieFileDelete)
|
||||||
.Ignore(i => i.SupportsOnMovieFileDeleteForUpgrade)
|
.Ignore(i => i.SupportsOnMovieFileDeleteForUpgrade)
|
||||||
.Ignore(i => i.SupportsOnHealthIssue);
|
.Ignore(i => i.SupportsOnHealthIssue)
|
||||||
|
.Ignore(i => i.SupportsOnApplicationUpdate);
|
||||||
|
|
||||||
Mapper.Entity<MetadataDefinition>("Metadata").RegisterModel()
|
Mapper.Entity<MetadataDefinition>("Metadata").RegisterModel()
|
||||||
.Ignore(x => x.ImplementationName)
|
.Ignore(x => x.ImplementationName)
|
||||||
|
@ -628,6 +628,8 @@
|
|||||||
"NoVideoFilesFoundSelectedFolder": "No video files were found in the selected folder",
|
"NoVideoFilesFoundSelectedFolder": "No video files were found in the selected folder",
|
||||||
"OAuthPopupMessage": "Pop-ups are being blocked by your browser",
|
"OAuthPopupMessage": "Pop-ups are being blocked by your browser",
|
||||||
"Ok": "Ok",
|
"Ok": "Ok",
|
||||||
|
"OnApplicationUpdate": "On Application Update",
|
||||||
|
"OnApplicationUpdateHelpText": "On Application Update",
|
||||||
"OnDownloadHelpText": "On Import",
|
"OnDownloadHelpText": "On Import",
|
||||||
"OnGrab": "On Grab",
|
"OnGrab": "On Grab",
|
||||||
"OnGrabHelpText": "On Grab",
|
"OnGrabHelpText": "On Grab",
|
||||||
|
16
src/NzbDrone.Core/Notifications/ApplciationUpdateMessage.cs
Normal file
16
src/NzbDrone.Core/Notifications/ApplciationUpdateMessage.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Notifications
|
||||||
|
{
|
||||||
|
public class ApplicationUpdateMessage
|
||||||
|
{
|
||||||
|
public string Message { get; set; }
|
||||||
|
public Version PreviousVersion { get; set; }
|
||||||
|
public Version NewVersion { get; set; }
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return NewVersion.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -41,6 +41,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck message)
|
|||||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE, message.Message, Settings);
|
_proxy.SendNotification(HEALTH_ISSUE_TITLE, message.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage message)
|
||||||
|
{
|
||||||
|
_proxy.SendNotification(APPLICATION_UPDATE_TITLE, message.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -185,6 +185,18 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
ExecuteScript(environmentVariables);
|
ExecuteScript(environmentVariables);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
var environmentVariables = new StringDictionary();
|
||||||
|
|
||||||
|
environmentVariables.Add("Radarr_EventType", "ApplicationUpdate");
|
||||||
|
environmentVariables.Add("Radarr_Update_Message", updateMessage.Message);
|
||||||
|
environmentVariables.Add("Radarr_Update_NewVersion", updateMessage.NewVersion.ToString());
|
||||||
|
environmentVariables.Add("Radarr_Update_PreviousVersion", updateMessage.PreviousVersion.ToString());
|
||||||
|
|
||||||
|
ExecuteScript(environmentVariables);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -292,6 +292,41 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendPayload(payload, Settings);
|
_proxy.SendPayload(payload, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
var attachments = new List<Embed>
|
||||||
|
{
|
||||||
|
new Embed
|
||||||
|
{
|
||||||
|
Author = new DiscordAuthor
|
||||||
|
{
|
||||||
|
Name = Settings.Author.IsNullOrWhiteSpace() ? Environment.MachineName : Settings.Author,
|
||||||
|
IconUrl = "https://raw.githubusercontent.com/Radarr/Radarr/develop/Logo/256.png"
|
||||||
|
},
|
||||||
|
Title = APPLICATION_UPDATE_TITLE,
|
||||||
|
Timestamp = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"),
|
||||||
|
Color = (int)DiscordColors.Standard,
|
||||||
|
Fields = new List<DiscordField>()
|
||||||
|
{
|
||||||
|
new DiscordField()
|
||||||
|
{
|
||||||
|
Name = "Previous Version",
|
||||||
|
Value = updateMessage.PreviousVersion.ToString()
|
||||||
|
},
|
||||||
|
new DiscordField()
|
||||||
|
{
|
||||||
|
Name = "New Version",
|
||||||
|
Value = updateMessage.NewVersion.ToString()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var payload = CreatePayload(null, attachments);
|
||||||
|
|
||||||
|
_proxy.SendPayload(payload, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -56,6 +56,13 @@ public override void OnHealthIssue(HealthCheck.HealthCheck message)
|
|||||||
SendEmail(Settings, HEALTH_ISSUE_TITLE_BRANDED, message.Message);
|
SendEmail(Settings, HEALTH_ISSUE_TITLE_BRANDED, message.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
var body = $"{updateMessage.Message}";
|
||||||
|
|
||||||
|
SendEmail(Settings, APPLICATION_UPDATE_TITLE_BRANDED, body);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -44,6 +44,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_proxy.SendNotification(APPLICATION_UPDATE_TITLE, updateMessage.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -15,6 +15,7 @@ public interface INotification : IProvider
|
|||||||
void OnMovieFileDelete(MovieFileDeleteMessage deleteMessage);
|
void OnMovieFileDelete(MovieFileDeleteMessage deleteMessage);
|
||||||
void OnMovieDelete(MovieDeleteMessage deleteMessage);
|
void OnMovieDelete(MovieDeleteMessage deleteMessage);
|
||||||
void OnHealthIssue(HealthCheck.HealthCheck healthCheck);
|
void OnHealthIssue(HealthCheck.HealthCheck healthCheck);
|
||||||
|
void OnApplicationUpdate(ApplicationUpdateMessage updateMessage);
|
||||||
void ProcessQueue();
|
void ProcessQueue();
|
||||||
bool SupportsOnGrab { get; }
|
bool SupportsOnGrab { get; }
|
||||||
bool SupportsOnDownload { get; }
|
bool SupportsOnDownload { get; }
|
||||||
@ -24,5 +25,6 @@ public interface INotification : IProvider
|
|||||||
bool SupportsOnMovieFileDelete { get; }
|
bool SupportsOnMovieFileDelete { get; }
|
||||||
bool SupportsOnMovieFileDeleteForUpgrade { get; }
|
bool SupportsOnMovieFileDeleteForUpgrade { get; }
|
||||||
bool SupportsOnHealthIssue { get; }
|
bool SupportsOnHealthIssue { get; }
|
||||||
|
bool SupportsOnApplicationUpdate { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck message)
|
|||||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE_BRANDED, message.Message, Settings);
|
_proxy.SendNotification(HEALTH_ISSUE_TITLE_BRANDED, message.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_proxy.SendNotification(APPLICATION_UPDATE_TITLE_BRANDED, updateMessage.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -48,6 +48,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheckMessage)
|
|||||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheckMessage.Message, Settings);
|
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheckMessage.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_proxy.SendNotification(APPLICATION_UPDATE_TITLE, updateMessage.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -55,6 +55,14 @@ public override void OnHealthIssue(HealthCheck.HealthCheck message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
if (Settings.Notify)
|
||||||
|
{
|
||||||
|
_mediaBrowserService.Notify(Settings, APPLICATION_UPDATE_TITLE_BRANDED, updateMessage.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void OnMovieDelete(MovieDeleteMessage deleteMessage)
|
public override void OnMovieDelete(MovieDeleteMessage deleteMessage)
|
||||||
{
|
{
|
||||||
if (deleteMessage.DeletedFiles)
|
if (deleteMessage.DeletedFiles)
|
||||||
|
@ -148,6 +148,18 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendNotification(variables, Settings);
|
_proxy.SendNotification(variables, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
var variables = new StringDictionary();
|
||||||
|
|
||||||
|
variables.Add("Radarr_EventType", "ApplicationUpdate");
|
||||||
|
variables.Add("Radarr_Update_Message", updateMessage.Message);
|
||||||
|
variables.Add("Radarr_Update_NewVersion", updateMessage.NewVersion.ToString());
|
||||||
|
variables.Add("Radarr_Update_PreviousVersion", updateMessage.PreviousVersion.ToString());
|
||||||
|
|
||||||
|
_proxy.SendNotification(variables, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -17,12 +17,14 @@ public abstract class NotificationBase<TSettings> : INotification
|
|||||||
protected const string MOVIE_DELETED_TITLE = "Movie Deleted";
|
protected const string MOVIE_DELETED_TITLE = "Movie Deleted";
|
||||||
protected const string MOVIE_FILE_DELETED_TITLE = "Movie File Deleted";
|
protected const string MOVIE_FILE_DELETED_TITLE = "Movie File Deleted";
|
||||||
protected const string HEALTH_ISSUE_TITLE = "Health Check Failure";
|
protected const string HEALTH_ISSUE_TITLE = "Health Check Failure";
|
||||||
|
protected const string APPLICATION_UPDATE_TITLE = "Application Updated";
|
||||||
|
|
||||||
protected const string MOVIE_GRABBED_TITLE_BRANDED = "Radarr - " + MOVIE_GRABBED_TITLE;
|
protected const string MOVIE_GRABBED_TITLE_BRANDED = "Radarr - " + MOVIE_GRABBED_TITLE;
|
||||||
protected const string MOVIE_DOWNLOADED_TITLE_BRANDED = "Radarr - " + MOVIE_DOWNLOADED_TITLE;
|
protected const string MOVIE_DOWNLOADED_TITLE_BRANDED = "Radarr - " + MOVIE_DOWNLOADED_TITLE;
|
||||||
protected const string MOVIE_DELETED_TITLE_BRANDED = "Radarr - " + MOVIE_DELETED_TITLE;
|
protected const string MOVIE_DELETED_TITLE_BRANDED = "Radarr - " + MOVIE_DELETED_TITLE;
|
||||||
protected const string MOVIE_FILE_DELETED_TITLE_BRANDED = "Radarr - " + MOVIE_FILE_DELETED_TITLE;
|
protected const string MOVIE_FILE_DELETED_TITLE_BRANDED = "Radarr - " + MOVIE_FILE_DELETED_TITLE;
|
||||||
protected const string HEALTH_ISSUE_TITLE_BRANDED = "Radarr - " + HEALTH_ISSUE_TITLE;
|
protected const string HEALTH_ISSUE_TITLE_BRANDED = "Radarr - " + HEALTH_ISSUE_TITLE;
|
||||||
|
protected const string APPLICATION_UPDATE_TITLE_BRANDED = "Radarr - " + APPLICATION_UPDATE_TITLE;
|
||||||
|
|
||||||
public abstract string Name { get; }
|
public abstract string Name { get; }
|
||||||
|
|
||||||
@ -61,6 +63,10 @@ public virtual void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public virtual void ProcessQueue()
|
public virtual void ProcessQueue()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -73,6 +79,7 @@ public virtual void ProcessQueue()
|
|||||||
public bool SupportsOnMovieFileDelete => HasConcreteImplementation("OnMovieFileDelete");
|
public bool SupportsOnMovieFileDelete => HasConcreteImplementation("OnMovieFileDelete");
|
||||||
public bool SupportsOnMovieFileDeleteForUpgrade => SupportsOnMovieFileDelete;
|
public bool SupportsOnMovieFileDeleteForUpgrade => SupportsOnMovieFileDelete;
|
||||||
public bool SupportsOnHealthIssue => HasConcreteImplementation("OnHealthIssue");
|
public bool SupportsOnHealthIssue => HasConcreteImplementation("OnHealthIssue");
|
||||||
|
public bool SupportsOnApplicationUpdate => HasConcreteImplementation("OnApplicationUpdate");
|
||||||
|
|
||||||
protected TSettings Settings => (TSettings)Definition.Settings;
|
protected TSettings Settings => (TSettings)Definition.Settings;
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ public class NotificationDefinition : ProviderDefinition
|
|||||||
public bool OnMovieFileDelete { get; set; }
|
public bool OnMovieFileDelete { get; set; }
|
||||||
public bool OnMovieFileDeleteForUpgrade { get; set; }
|
public bool OnMovieFileDeleteForUpgrade { get; set; }
|
||||||
public bool OnHealthIssue { get; set; }
|
public bool OnHealthIssue { get; set; }
|
||||||
|
public bool OnApplicationUpdate { get; set; }
|
||||||
public bool SupportsOnGrab { get; set; }
|
public bool SupportsOnGrab { get; set; }
|
||||||
public bool SupportsOnDownload { get; set; }
|
public bool SupportsOnDownload { get; set; }
|
||||||
public bool SupportsOnUpgrade { get; set; }
|
public bool SupportsOnUpgrade { get; set; }
|
||||||
@ -21,7 +22,8 @@ public class NotificationDefinition : ProviderDefinition
|
|||||||
public bool SupportsOnMovieFileDeleteForUpgrade { get; set; }
|
public bool SupportsOnMovieFileDeleteForUpgrade { get; set; }
|
||||||
public bool SupportsOnHealthIssue { get; set; }
|
public bool SupportsOnHealthIssue { get; set; }
|
||||||
public bool IncludeHealthWarnings { get; set; }
|
public bool IncludeHealthWarnings { get; set; }
|
||||||
|
public bool SupportsOnApplicationUpdate { get; set; }
|
||||||
|
|
||||||
public override bool Enable => OnGrab || OnDownload || (OnDownload && OnUpgrade) || OnMovieDelete || OnMovieFileDelete || OnMovieFileDeleteForUpgrade || OnHealthIssue;
|
public override bool Enable => OnGrab || OnDownload || (OnDownload && OnUpgrade) || OnMovieDelete || OnMovieFileDelete || OnMovieFileDeleteForUpgrade || OnHealthIssue || OnApplicationUpdate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ public interface INotificationFactory : IProviderFactory<INotification, Notifica
|
|||||||
List<INotification> OnMovieDeleteEnabled();
|
List<INotification> OnMovieDeleteEnabled();
|
||||||
List<INotification> OnMovieFileDeleteEnabled();
|
List<INotification> OnMovieFileDeleteEnabled();
|
||||||
List<INotification> OnHealthIssueEnabled();
|
List<INotification> OnHealthIssueEnabled();
|
||||||
|
List<INotification> OnApplicationUpdateEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class NotificationFactory : ProviderFactory<INotification, NotificationDefinition>, INotificationFactory
|
public class NotificationFactory : ProviderFactory<INotification, NotificationDefinition>, INotificationFactory
|
||||||
@ -66,6 +67,11 @@ public List<INotification> OnHealthIssueEnabled()
|
|||||||
return GetAvailableProviders().Where(n => ((NotificationDefinition)n.Definition).OnHealthIssue).ToList();
|
return GetAvailableProviders().Where(n => ((NotificationDefinition)n.Definition).OnHealthIssue).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<INotification> OnApplicationUpdateEnabled()
|
||||||
|
{
|
||||||
|
return GetAvailableProviders().Where(n => ((NotificationDefinition)n.Definition).OnApplicationUpdate).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public override void SetProviderCharacteristics(INotification provider, NotificationDefinition definition)
|
public override void SetProviderCharacteristics(INotification provider, NotificationDefinition definition)
|
||||||
{
|
{
|
||||||
base.SetProviderCharacteristics(provider, definition);
|
base.SetProviderCharacteristics(provider, definition);
|
||||||
@ -78,6 +84,7 @@ public override void SetProviderCharacteristics(INotification provider, Notifica
|
|||||||
definition.SupportsOnMovieFileDelete = provider.SupportsOnMovieFileDelete;
|
definition.SupportsOnMovieFileDelete = provider.SupportsOnMovieFileDelete;
|
||||||
definition.SupportsOnMovieFileDeleteForUpgrade = provider.SupportsOnMovieFileDeleteForUpgrade;
|
definition.SupportsOnMovieFileDeleteForUpgrade = provider.SupportsOnMovieFileDeleteForUpgrade;
|
||||||
definition.SupportsOnHealthIssue = provider.SupportsOnHealthIssue;
|
definition.SupportsOnHealthIssue = provider.SupportsOnHealthIssue;
|
||||||
|
definition.SupportsOnApplicationUpdate = provider.SupportsOnApplicationUpdate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
using NzbDrone.Core.Movies.Events;
|
using NzbDrone.Core.Movies.Events;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
using NzbDrone.Core.ThingiProvider;
|
using NzbDrone.Core.ThingiProvider;
|
||||||
|
using NzbDrone.Core.Update.History.Events;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Notifications
|
namespace NzbDrone.Core.Notifications
|
||||||
{
|
{
|
||||||
@ -20,6 +21,7 @@ public class NotificationService
|
|||||||
IHandle<MoviesDeletedEvent>,
|
IHandle<MoviesDeletedEvent>,
|
||||||
IHandle<MovieFileDeletedEvent>,
|
IHandle<MovieFileDeletedEvent>,
|
||||||
IHandle<HealthCheckFailedEvent>,
|
IHandle<HealthCheckFailedEvent>,
|
||||||
|
IHandle<UpdateInstalledEvent>,
|
||||||
IHandleAsync<DeleteCompletedEvent>,
|
IHandleAsync<DeleteCompletedEvent>,
|
||||||
IHandleAsync<DownloadsProcessedEvent>,
|
IHandleAsync<DownloadsProcessedEvent>,
|
||||||
IHandleAsync<RenameCompletedEvent>,
|
IHandleAsync<RenameCompletedEvent>,
|
||||||
@ -162,6 +164,26 @@ public void Handle(MovieRenamedEvent message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Handle(UpdateInstalledEvent message)
|
||||||
|
{
|
||||||
|
var updateMessage = new ApplicationUpdateMessage();
|
||||||
|
updateMessage.Message = $"Radarr updated from {message.PreviousVerison.ToString()} to {message.NewVersion.ToString()}";
|
||||||
|
updateMessage.PreviousVersion = message.PreviousVerison;
|
||||||
|
updateMessage.NewVersion = message.NewVersion;
|
||||||
|
|
||||||
|
foreach (var notification in _notificationFactory.OnApplicationUpdateEnabled())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
notification.OnApplicationUpdate(updateMessage);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.Warn(ex, "Unable to send OnApplicationUpdate notification to: " + notification.Definition.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Handle(MovieFileDeletedEvent message)
|
public void Handle(MovieFileDeletedEvent message)
|
||||||
{
|
{
|
||||||
var deleteMessage = new MovieFileDeleteMessage();
|
var deleteMessage = new MovieFileDeleteMessage();
|
||||||
|
@ -41,6 +41,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck message)
|
|||||||
_prowlProxy.SendNotification(HEALTH_ISSUE_TITLE, message.Message, Settings);
|
_prowlProxy.SendNotification(HEALTH_ISSUE_TITLE, message.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_prowlProxy.SendNotification(APPLICATION_UPDATE_TITLE, updateMessage.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -44,6 +44,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE_BRANDED, healthCheck.Message, Settings);
|
_proxy.SendNotification(HEALTH_ISSUE_TITLE_BRANDED, healthCheck.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_proxy.SendNotification(APPLICATION_UPDATE_TITLE_BRANDED, updateMessage.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -41,6 +41,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_proxy.SendNotification(APPLICATION_UPDATE_TITLE, updateMessage.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -44,6 +44,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_proxy.SendNotification(APPLICATION_UPDATE_TITLE, updateMessage.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -41,6 +41,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_proxy.SendNotification(APPLICATION_UPDATE_TITLE, updateMessage.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -124,6 +124,23 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendPayload(payload, Settings);
|
_proxy.SendPayload(payload, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
var attachments = new List<Attachment>
|
||||||
|
{
|
||||||
|
new Attachment
|
||||||
|
{
|
||||||
|
Title = Environment.MachineName,
|
||||||
|
Text = updateMessage.Message,
|
||||||
|
Color = "good"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var payload = CreatePayload("Application Updated", attachments);
|
||||||
|
|
||||||
|
_proxy.SendPayload(payload, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -49,6 +49,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
_proxy.SendNotification(HEALTH_ISSUE_TITLE, healthCheck.Message, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_proxy.SendNotification(APPLICATION_UPDATE_TITLE, updateMessage.Message, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
{
|
{
|
||||||
var failures = new List<ValidationFailure>();
|
var failures = new List<ValidationFailure>();
|
||||||
|
@ -43,6 +43,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_twitterService.SendNotification($"Health Issue: {healthCheck.Message}", Settings);
|
_twitterService.SendNotification($"Health Issue: {healthCheck.Message}", Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
_twitterService.SendNotification($"Application Updated: {updateMessage.Message}", Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override object RequestAction(string action, IDictionary<string, string> query)
|
public override object RequestAction(string action, IDictionary<string, string> query)
|
||||||
{
|
{
|
||||||
if (action == "startOAuth")
|
if (action == "startOAuth")
|
||||||
|
@ -116,6 +116,19 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
_proxy.SendWebhook(payload, Settings);
|
_proxy.SendWebhook(payload, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
var payload = new WebhookApplicationUpdatePayload
|
||||||
|
{
|
||||||
|
EventType = WebhookEventType.ApplicationUpdate,
|
||||||
|
Message = updateMessage.Message,
|
||||||
|
PreviousVersion = updateMessage.PreviousVersion.ToString(),
|
||||||
|
NewVersion = updateMessage.NewVersion.ToString()
|
||||||
|
};
|
||||||
|
|
||||||
|
_proxy.SendWebhook(payload, Settings);
|
||||||
|
}
|
||||||
|
|
||||||
public override string Name => "Webhook";
|
public override string Name => "Webhook";
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
using NzbDrone.Core.HealthCheck;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Notifications.Webhook
|
||||||
|
{
|
||||||
|
public class WebhookApplicationUpdatePayload : WebhookPayload
|
||||||
|
{
|
||||||
|
public string Message { get; set; }
|
||||||
|
public string PreviousVersion { get; set; }
|
||||||
|
public string NewVersion { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -14,6 +14,7 @@ public enum WebhookEventType
|
|||||||
Rename,
|
Rename,
|
||||||
MovieDelete,
|
MovieDelete,
|
||||||
MovieFileDelete,
|
MovieFileDelete,
|
||||||
Health
|
Health,
|
||||||
|
ApplicationUpdate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,11 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
|||||||
Notify(Settings, HEALTH_ISSUE_TITLE_BRANDED, healthCheck.Message);
|
Notify(Settings, HEALTH_ISSUE_TITLE_BRANDED, healthCheck.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||||
|
{
|
||||||
|
Notify(Settings, APPLICATION_UPDATE_TITLE_BRANDED, updateMessage.Message);
|
||||||
|
}
|
||||||
|
|
||||||
public override string Name => "Kodi";
|
public override string Name => "Kodi";
|
||||||
|
|
||||||
public override ValidationResult Test()
|
public override ValidationResult Test()
|
||||||
|
@ -13,6 +13,7 @@ public class NotificationResource : ProviderResource<NotificationResource>
|
|||||||
public bool OnMovieFileDelete { get; set; }
|
public bool OnMovieFileDelete { get; set; }
|
||||||
public bool OnMovieFileDeleteForUpgrade { get; set; }
|
public bool OnMovieFileDeleteForUpgrade { get; set; }
|
||||||
public bool OnHealthIssue { get; set; }
|
public bool OnHealthIssue { get; set; }
|
||||||
|
public bool OnApplciationUpdate { get; set; }
|
||||||
public bool SupportsOnGrab { get; set; }
|
public bool SupportsOnGrab { get; set; }
|
||||||
public bool SupportsOnDownload { get; set; }
|
public bool SupportsOnDownload { get; set; }
|
||||||
public bool SupportsOnUpgrade { get; set; }
|
public bool SupportsOnUpgrade { get; set; }
|
||||||
@ -21,6 +22,7 @@ public class NotificationResource : ProviderResource<NotificationResource>
|
|||||||
public bool SupportsOnMovieFileDelete { get; set; }
|
public bool SupportsOnMovieFileDelete { get; set; }
|
||||||
public bool SupportsOnMovieFileDeleteForUpgrade { get; set; }
|
public bool SupportsOnMovieFileDeleteForUpgrade { get; set; }
|
||||||
public bool SupportsOnHealthIssue { get; set; }
|
public bool SupportsOnHealthIssue { get; set; }
|
||||||
|
public bool SupportsOnApplicationUpdate { get; set; }
|
||||||
public bool IncludeHealthWarnings { get; set; }
|
public bool IncludeHealthWarnings { get; set; }
|
||||||
public string TestCommand { get; set; }
|
public string TestCommand { get; set; }
|
||||||
}
|
}
|
||||||
@ -44,6 +46,7 @@ public override NotificationResource ToResource(NotificationDefinition definitio
|
|||||||
resource.OnMovieFileDelete = definition.OnMovieFileDelete;
|
resource.OnMovieFileDelete = definition.OnMovieFileDelete;
|
||||||
resource.OnMovieFileDeleteForUpgrade = definition.OnMovieFileDeleteForUpgrade;
|
resource.OnMovieFileDeleteForUpgrade = definition.OnMovieFileDeleteForUpgrade;
|
||||||
resource.OnHealthIssue = definition.OnHealthIssue;
|
resource.OnHealthIssue = definition.OnHealthIssue;
|
||||||
|
resource.OnApplciationUpdate = definition.OnApplicationUpdate;
|
||||||
resource.SupportsOnGrab = definition.SupportsOnGrab;
|
resource.SupportsOnGrab = definition.SupportsOnGrab;
|
||||||
resource.SupportsOnDownload = definition.SupportsOnDownload;
|
resource.SupportsOnDownload = definition.SupportsOnDownload;
|
||||||
resource.SupportsOnUpgrade = definition.SupportsOnUpgrade;
|
resource.SupportsOnUpgrade = definition.SupportsOnUpgrade;
|
||||||
@ -53,6 +56,7 @@ public override NotificationResource ToResource(NotificationDefinition definitio
|
|||||||
resource.SupportsOnMovieFileDeleteForUpgrade = definition.SupportsOnMovieFileDeleteForUpgrade;
|
resource.SupportsOnMovieFileDeleteForUpgrade = definition.SupportsOnMovieFileDeleteForUpgrade;
|
||||||
resource.SupportsOnHealthIssue = definition.SupportsOnHealthIssue;
|
resource.SupportsOnHealthIssue = definition.SupportsOnHealthIssue;
|
||||||
resource.IncludeHealthWarnings = definition.IncludeHealthWarnings;
|
resource.IncludeHealthWarnings = definition.IncludeHealthWarnings;
|
||||||
|
resource.SupportsOnApplicationUpdate = definition.SupportsOnApplicationUpdate;
|
||||||
|
|
||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
@ -74,6 +78,7 @@ public override NotificationDefinition ToModel(NotificationResource resource)
|
|||||||
definition.OnMovieFileDelete = resource.OnMovieFileDelete;
|
definition.OnMovieFileDelete = resource.OnMovieFileDelete;
|
||||||
definition.OnMovieFileDeleteForUpgrade = resource.OnMovieFileDeleteForUpgrade;
|
definition.OnMovieFileDeleteForUpgrade = resource.OnMovieFileDeleteForUpgrade;
|
||||||
definition.OnHealthIssue = resource.OnHealthIssue;
|
definition.OnHealthIssue = resource.OnHealthIssue;
|
||||||
|
definition.OnApplicationUpdate = resource.OnApplciationUpdate;
|
||||||
definition.SupportsOnGrab = resource.SupportsOnGrab;
|
definition.SupportsOnGrab = resource.SupportsOnGrab;
|
||||||
definition.SupportsOnDownload = resource.SupportsOnDownload;
|
definition.SupportsOnDownload = resource.SupportsOnDownload;
|
||||||
definition.SupportsOnUpgrade = resource.SupportsOnUpgrade;
|
definition.SupportsOnUpgrade = resource.SupportsOnUpgrade;
|
||||||
@ -83,6 +88,7 @@ public override NotificationDefinition ToModel(NotificationResource resource)
|
|||||||
definition.SupportsOnMovieFileDeleteForUpgrade = resource.SupportsOnMovieFileDeleteForUpgrade;
|
definition.SupportsOnMovieFileDeleteForUpgrade = resource.SupportsOnMovieFileDeleteForUpgrade;
|
||||||
definition.SupportsOnHealthIssue = resource.SupportsOnHealthIssue;
|
definition.SupportsOnHealthIssue = resource.SupportsOnHealthIssue;
|
||||||
definition.IncludeHealthWarnings = resource.IncludeHealthWarnings;
|
definition.IncludeHealthWarnings = resource.IncludeHealthWarnings;
|
||||||
|
definition.SupportsOnApplicationUpdate = resource.SupportsOnApplicationUpdate;
|
||||||
|
|
||||||
return definition;
|
return definition;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user