Added a scroll to the top thingy and a bit more work on headphones

This commit is contained in:
tidusjar 2016-03-30 13:59:13 +01:00
parent 0429530bf3
commit f7c33d48f4
11 changed files with 151 additions and 13 deletions

View file

@ -58,7 +58,7 @@ namespace PlexRequests.UI.Modules
{
public class AdminModule : NancyModule
{
private ISettingsService<PlexRequestSettings> RpService { get; }
private ISettingsService<PlexRequestSettings> PrService { get; }
private ISettingsService<CouchPotatoSettings> CpService { get; }
private ISettingsService<AuthenticationSettings> AuthService { get; }
private ISettingsService<PlexSettings> PlexService { get; }
@ -77,7 +77,7 @@ namespace PlexRequests.UI.Modules
private INotificationService NotificationService { get; }
private static Logger Log = LogManager.GetCurrentClassLogger();
public AdminModule(ISettingsService<PlexRequestSettings> rpService,
public AdminModule(ISettingsService<PlexRequestSettings> prService,
ISettingsService<CouchPotatoSettings> cpService,
ISettingsService<AuthenticationSettings> auth,
ISettingsService<PlexSettings> plex,
@ -95,7 +95,7 @@ namespace PlexRequests.UI.Modules
INotificationService notify,
ISettingsService<HeadphonesSettings> headphones) : base("admin")
{
RpService = rpService;
PrService = prService;
CpService = cpService;
AuthService = auth;
PlexService = plex;
@ -182,7 +182,7 @@ namespace PlexRequests.UI.Modules
private Negotiator Admin()
{
var settings = RpService.GetSettings();
var settings = PrService.GetSettings();
Log.Trace("Getting Settings:");
Log.Trace(settings.DumpJson());
@ -193,7 +193,7 @@ namespace PlexRequests.UI.Modules
{
var model = this.Bind<PlexRequestSettings>();
RpService.SaveSettings(model);
PrService.SaveSettings(model);
return Context.GetRedirect("~/admin");