mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Notification settings added to the UI
This commit is contained in:
@@ -39,7 +39,6 @@ namespace NzbDrone.Core.Notifications
|
||||
|
||||
public List<Notification> All()
|
||||
{
|
||||
var test = _notificationRepository.All();//.Select(ToNotification).ToList();
|
||||
return _notificationRepository.All().Select(ToNotification).ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,14 +21,21 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
||||
{
|
||||
const string header = "NzbDrone [TV] - Grabbed";
|
||||
|
||||
_xbmcProvider.Notify(Settings, header, message);
|
||||
if (Settings.Notify)
|
||||
{
|
||||
_xbmcProvider.Notify(Settings, header, message);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDownload(string message, Series series)
|
||||
{
|
||||
const string header = "NzbDrone [TV] - Downloaded";
|
||||
|
||||
_xbmcProvider.Notify(Settings, header, message);
|
||||
if (Settings.Notify)
|
||||
{
|
||||
_xbmcProvider.Notify(Settings, header, message);
|
||||
}
|
||||
|
||||
UpdateAndClean(series);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,25 +8,28 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
||||
{
|
||||
public class XbmcSettings : INotifcationSettings
|
||||
{
|
||||
[FieldDefinition(0, Label = "Host", HelpText = "XBMC Hostnname or IP")]
|
||||
[FieldDefinition(0, Label = "Host")]
|
||||
public String Host { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "Port", HelpText = "Webserver port")]
|
||||
[FieldDefinition(1, Label = "Port")]
|
||||
public Int32 Port { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Username", HelpText = "Webserver Username")]
|
||||
[FieldDefinition(2, Label = "Username")]
|
||||
public String Username { get; set; }
|
||||
|
||||
[FieldDefinition(3, Label = "Password", HelpText = "Webserver Password ")]
|
||||
[FieldDefinition(3, Label = "Password", Type = FieldType.Password)]
|
||||
public String Password { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "Update Library", HelpText = "Update Library on Download & Rename?")]
|
||||
[FieldDefinition(4, Label = "GUI Notification", HelpText = "Show GUI notifications?", Type = FieldType.Checkbox)]
|
||||
public Boolean Notify { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Update Library", HelpText = "Update Library on Download & Rename?", Type = FieldType.Checkbox)]
|
||||
public Boolean UpdateLibrary { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Update Library", HelpText = "Clean Library after update?")]
|
||||
[FieldDefinition(6, Label = "Clean Library", HelpText = "Clean Library after update?", Type = FieldType.Checkbox)]
|
||||
public Boolean CleanLibrary { get; set; }
|
||||
|
||||
[FieldDefinition(6, Label = "Always Update", HelpText = "Update Library even when a video is playing?")]
|
||||
[FieldDefinition(7, Label = "Always Update", HelpText = "Update Library even when a video is playing?", Type = FieldType.Checkbox)]
|
||||
public Boolean AlwaysUpdate { get; set; }
|
||||
|
||||
public bool IsValid
|
||||
|
||||
Reference in New Issue
Block a user