mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 02:22:31 +01:00
Remove Kodi specific settings from PHT Settings
This commit is contained in:
parent
9f73b2b7f0
commit
c4e1a732dd
@ -53,11 +53,9 @@ public static List<Field> ToSchema(object model)
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
return result.OrderBy(r => r.Order).ToList();
|
||||
}
|
||||
|
||||
|
||||
public static object ReadFormSchema(List<Field> fields, Type targetType, object defaults = null)
|
||||
{
|
||||
Ensure.That(targetType, () => targetType).IsNotNull();
|
||||
|
@ -25,6 +25,7 @@ public enum FieldType
|
||||
Password,
|
||||
Checkbox,
|
||||
Select,
|
||||
Path
|
||||
Path,
|
||||
Hidden
|
||||
}
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
using NzbDrone.Core.Notifications.Xbmc;
|
||||
using System;
|
||||
using NzbDrone.Core.Annotations;
|
||||
using NzbDrone.Core.Notifications.Xbmc;
|
||||
|
||||
namespace NzbDrone.Core.Notifications.Plex
|
||||
{
|
||||
@ -6,8 +8,28 @@ public class PlexHomeTheaterSettings : XbmcSettings
|
||||
{
|
||||
public PlexHomeTheaterSettings()
|
||||
{
|
||||
DisplayTime = 5;
|
||||
Port = 3005;
|
||||
Notify = true;
|
||||
}
|
||||
|
||||
//These need to be kept in the same order as XBMC Settings, but we don't want them displayed
|
||||
|
||||
[FieldDefinition(2, Label = "Username", Type = FieldType.Hidden)]
|
||||
public String Username { get; set; }
|
||||
|
||||
[FieldDefinition(3, Label = "Password", Type = FieldType.Hidden)]
|
||||
public String Password { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "GUI Notification", Type = FieldType.Hidden)]
|
||||
public Boolean Notify { get; set; }
|
||||
|
||||
[FieldDefinition(6, Label = "Update Library", HelpText = "Update Library on Download & Rename?", Type = FieldType.Hidden)]
|
||||
public Boolean UpdateLibrary { get; set; }
|
||||
|
||||
[FieldDefinition(7, Label = "Clean Library", HelpText = "Clean Library after update?", Type = FieldType.Hidden)]
|
||||
public Boolean CleanLibrary { get; set; }
|
||||
|
||||
[FieldDefinition(8, Label = "Always Update", HelpText = "Update Library even when a video is playing?", Type = FieldType.Hidden)]
|
||||
public Boolean AlwaysUpdate { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class XbmcSettings : IProviderConfig
|
||||
|
||||
public XbmcSettings()
|
||||
{
|
||||
DisplayTime = 5;
|
||||
Port = 8080;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,10 @@ var _fieldBuilder = function(field) {
|
||||
return _templateRenderer.call(field, 'Form/TextboxTemplate');
|
||||
}
|
||||
|
||||
if (field.type === 'hidden') {
|
||||
return _templateRenderer.call(field, 'Form/HiddenTemplate');
|
||||
}
|
||||
|
||||
if (field.type === 'password') {
|
||||
return _templateRenderer.call(field, 'Form/PasswordTemplate');
|
||||
}
|
||||
|
8
src/UI/Form/HiddenTemplate.hbs
Normal file
8
src/UI/Form/HiddenTemplate.hbs
Normal file
@ -0,0 +1,8 @@
|
||||
<div class="form-group hidden">
|
||||
<label class="col-sm-3 control-label">{{label}}</label>
|
||||
|
||||
<div class="col-sm-5">
|
||||
<input type="text" name="fields.{{order}}.value" validation-name="{{name}}" spellcheck="false" class="form-control"/>
|
||||
</div>
|
||||
{{> FormHelpPartial}}
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user