a little more kernel consolidation

This commit is contained in:
Luke Pulverenti 2013-06-03 14:15:35 -04:00
parent 59118a2ddb
commit 08d9004d8f
12 changed files with 98 additions and 102 deletions

View file

@ -658,7 +658,7 @@ namespace MediaBrowser.Api.Images
// See if we can avoid a file system lookup by looking for the file in ResolveArgs // See if we can avoid a file system lookup by looking for the file in ResolveArgs
var originalFileImageDateModified = kernel.ImageManager.GetImageDateModified(item, request.Type, index); var originalFileImageDateModified = kernel.ImageManager.GetImageDateModified(item, request.Type, index);
var supportedImageEnhancers = kernel.ImageEnhancers.Where(i => var supportedImageEnhancers = kernel.ImageManager.ImageEnhancers.Where(i =>
{ {
try try
{ {

View file

@ -25,6 +25,13 @@ namespace MediaBrowser.Controller.Drawing
/// </summary> /// </summary>
public class ImageManager public class ImageManager
{ {
/// <summary>
/// Gets the list of currently registered image processors
/// Image processors are specialized metadata providers that run after the normal ones
/// </summary>
/// <value>The image enhancers.</value>
public IEnumerable<IImageEnhancer> ImageEnhancers { get; set; }
/// <summary> /// <summary>
/// Gets the image size cache. /// Gets the image size cache.
/// </summary> /// </summary>
@ -120,7 +127,7 @@ namespace MediaBrowser.Controller.Drawing
originalImagePath = await GetCroppedImage(originalImagePath, dateModified).ConfigureAwait(false); originalImagePath = await GetCroppedImage(originalImagePath, dateModified).ConfigureAwait(false);
} }
var supportedEnhancers = _kernel.ImageEnhancers.Where(i => var supportedEnhancers = ImageEnhancers.Where(i =>
{ {
try try
{ {
@ -621,7 +628,7 @@ namespace MediaBrowser.Controller.Drawing
var dateModified = GetImageDateModified(item, imagePath); var dateModified = GetImageDateModified(item, imagePath);
var supportedEnhancers = _kernel.ImageEnhancers.Where(i => var supportedEnhancers = ImageEnhancers.Where(i =>
{ {
try try
{ {

View file

@ -182,7 +182,7 @@ namespace MediaBrowser.Controller.Dto
return; return;
} }
var supportedEnhancers = Kernel.Instance.ImageEnhancers.Where(i => var supportedEnhancers = Kernel.Instance.ImageManager.ImageEnhancers.Where(i =>
{ {
try try
{ {

View file

@ -13,5 +13,17 @@ namespace MediaBrowser.Controller
/// </summary> /// </summary>
/// <returns>SystemInfo.</returns> /// <returns>SystemInfo.</returns>
SystemInfo GetSystemInfo(); SystemInfo GetSystemInfo();
/// <summary>
/// Gets the name of the web application.
/// </summary>
/// <value>The name of the web application.</value>
string WebApplicationName { get; }
/// <summary>
/// Gets the HTTP server URL prefix.
/// </summary>
/// <value>The HTTP server URL prefix.</value>
string HttpServerUrlPrefix { get; }
} }
} }

View file

@ -1,8 +1,5 @@
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Localization;
using MediaBrowser.Controller.MediaInfo; using MediaBrowser.Controller.MediaInfo;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Weather; using MediaBrowser.Controller.Weather;
using System.Collections.Generic; using System.Collections.Generic;
@ -31,58 +28,18 @@ namespace MediaBrowser.Controller
/// <value>The FFMPEG controller.</value> /// <value>The FFMPEG controller.</value>
public FFMpegManager FFMpegManager { get; set; } public FFMpegManager FFMpegManager { get; set; }
/// <summary>
/// Gets the name of the web application that can be used for url building.
/// All api urls will be of the form {protocol}://{host}:{port}/{appname}/...
/// </summary>
/// <value>The name of the web application.</value>
public string WebApplicationName
{
get { return "mediabrowser"; }
}
/// <summary>
/// Gets the HTTP server URL prefix.
/// </summary>
/// <value>The HTTP server URL prefix.</value>
public virtual string HttpServerUrlPrefix
{
get
{
return "http://+:" + _configurationManager.Configuration.HttpServerPortNumber + "/" + WebApplicationName + "/";
}
}
/// <summary>
/// Gets the list of Localized string files
/// </summary>
/// <value>The string files.</value>
public IEnumerable<LocalizedStringData> StringFiles { get; set; }
/// <summary> /// <summary>
/// Gets the list of currently registered weather prvoiders /// Gets the list of currently registered weather prvoiders
/// </summary> /// </summary>
/// <value>The weather providers.</value> /// <value>The weather providers.</value>
public IEnumerable<IWeatherProvider> WeatherProviders { get; set; } public IEnumerable<IWeatherProvider> WeatherProviders { get; set; }
/// <summary>
/// Gets the list of currently registered image processors
/// Image processors are specialized metadata providers that run after the normal ones
/// </summary>
/// <value>The image enhancers.</value>
public IEnumerable<IImageEnhancer> ImageEnhancers { get; set; }
private readonly IServerConfigurationManager _configurationManager;
/// <summary> /// <summary>
/// Creates a kernel based on a Data path, which is akin to our current programdata path /// Creates a kernel based on a Data path, which is akin to our current programdata path
/// </summary> /// </summary>
/// <param name="configurationManager">The configuration manager.</param> public Kernel()
public Kernel(IServerConfigurationManager configurationManager)
{ {
Instance = this; Instance = this;
_configurationManager = configurationManager;
} }
} }
} }

View file

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
@ -13,7 +14,13 @@ namespace MediaBrowser.Controller.Localization
public class LocalizedStrings public class LocalizedStrings
{ {
public static IServerApplicationPaths ApplicationPaths; public static IServerApplicationPaths ApplicationPaths;
/// <summary>
/// Gets the list of Localized string files
/// </summary>
/// <value>The string files.</value>
public static IEnumerable<LocalizedStringData> StringFiles { get; set; }
/// <summary> /// <summary>
/// The base prefix /// The base prefix
/// </summary> /// </summary>
@ -42,7 +49,7 @@ namespace MediaBrowser.Controller.Localization
{ {
_appPaths = appPaths; _appPaths = appPaths;
foreach (var stringObject in Kernel.Instance.StringFiles) foreach (var stringObject in StringFiles)
{ {
AddStringData(LoadFromFile(GetFileName(stringObject),stringObject.GetType())); AddStringData(LoadFromFile(GetFileName(stringObject),stringObject.GetType()));
} }

View file

@ -59,7 +59,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager
/// <summary> /// <summary>
/// The _application host /// The _application host
/// </summary> /// </summary>
private readonly IApplicationHost _applicationHost; private readonly IServerApplicationHost _applicationHost;
/// <summary> /// <summary>
/// Gets or sets the configuration manager. /// Gets or sets the configuration manager.
@ -91,11 +91,6 @@ namespace MediaBrowser.Server.Implementations.ServerManager
/// <value>The web socket listeners.</value> /// <value>The web socket listeners.</value>
private readonly List<IWebSocketListener> _webSocketListeners = new List<IWebSocketListener>(); private readonly List<IWebSocketListener> _webSocketListeners = new List<IWebSocketListener>();
/// <summary>
/// The _kernel
/// </summary>
private readonly Kernel _kernel;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ServerManager" /> class. /// Initializes a new instance of the <see cref="ServerManager" /> class.
/// </summary> /// </summary>
@ -103,9 +98,8 @@ namespace MediaBrowser.Server.Implementations.ServerManager
/// <param name="jsonSerializer">The json serializer.</param> /// <param name="jsonSerializer">The json serializer.</param>
/// <param name="logger">The logger.</param> /// <param name="logger">The logger.</param>
/// <param name="configurationManager">The configuration manager.</param> /// <param name="configurationManager">The configuration manager.</param>
/// <param name="kernel">The kernel.</param>
/// <exception cref="System.ArgumentNullException">applicationHost</exception> /// <exception cref="System.ArgumentNullException">applicationHost</exception>
public ServerManager(IApplicationHost applicationHost, IJsonSerializer jsonSerializer, ILogger logger, IServerConfigurationManager configurationManager, Kernel kernel) public ServerManager(IServerApplicationHost applicationHost, IJsonSerializer jsonSerializer, ILogger logger, IServerConfigurationManager configurationManager)
{ {
if (applicationHost == null) if (applicationHost == null)
{ {
@ -124,7 +118,6 @@ namespace MediaBrowser.Server.Implementations.ServerManager
_jsonSerializer = jsonSerializer; _jsonSerializer = jsonSerializer;
_applicationHost = applicationHost; _applicationHost = applicationHost;
ConfigurationManager = configurationManager; ConfigurationManager = configurationManager;
_kernel = kernel;
ConfigurationManager.ConfigurationUpdated += ConfigurationUpdated; ConfigurationManager.ConfigurationUpdated += ConfigurationUpdated;
} }
@ -161,7 +154,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager
private void ReloadHttpServer() private void ReloadHttpServer()
{ {
// Only reload if the port has changed, so that we don't disconnect any active users // Only reload if the port has changed, so that we don't disconnect any active users
if (HttpServer != null && HttpServer.UrlPrefix.Equals(_kernel.HttpServerUrlPrefix, StringComparison.OrdinalIgnoreCase)) if (HttpServer != null && HttpServer.UrlPrefix.Equals(_applicationHost.HttpServerUrlPrefix, StringComparison.OrdinalIgnoreCase))
{ {
return; return;
} }
@ -174,7 +167,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager
{ {
HttpServer = _applicationHost.Resolve<IHttpServer>(); HttpServer = _applicationHost.Resolve<IHttpServer>();
HttpServer.EnableHttpRequestLogging = ConfigurationManager.Configuration.EnableHttpLevelLogging; HttpServer.EnableHttpRequestLogging = ConfigurationManager.Configuration.EnableHttpLevelLogging;
HttpServer.Start(_kernel.HttpServerUrlPrefix); HttpServer.Start(_applicationHost.HttpServerUrlPrefix);
} }
catch (HttpListenerException ex) catch (HttpListenerException ex)
{ {

View file

@ -49,7 +49,7 @@ namespace MediaBrowser.Server.Implementations.Sqlite
/// <param name="dbPath">The db path.</param> /// <param name="dbPath">The db path.</param>
/// <returns>Task{System.Boolean}.</returns> /// <returns>Task{System.Boolean}.</returns>
/// <exception cref="System.ArgumentNullException">dbPath</exception> /// <exception cref="System.ArgumentNullException">dbPath</exception>
protected async Task ConnectToDb(string dbPath) protected Task ConnectToDb(string dbPath)
{ {
if (string.IsNullOrEmpty(dbPath)) if (string.IsNullOrEmpty(dbPath))
{ {
@ -68,7 +68,7 @@ namespace MediaBrowser.Server.Implementations.Sqlite
Connection = new SQLiteConnection(connectionstr.ConnectionString); Connection = new SQLiteConnection(connectionstr.ConnectionString);
await Connection.OpenAsync().ConfigureAwait(false); return Connection.OpenAsync();
} }
/// <summary> /// <summary>
@ -164,7 +164,7 @@ namespace MediaBrowser.Server.Implementations.Sqlite
{ {
throw new ArgumentNullException("reader"); throw new ArgumentNullException("reader");
} }
var memoryStream = new MemoryStream(); var memoryStream = new MemoryStream();
var num = 0L; var num = 0L;
var array = new byte[4096]; var array = new byte[4096];

View file

@ -226,10 +226,13 @@ namespace MediaBrowser.ServerApplication
/// Opens the dashboard page. /// Opens the dashboard page.
/// </summary> /// </summary>
/// <param name="page">The page.</param> /// <param name="page">The page.</param>
public static void OpenDashboardPage(string page, User loggedInUser, IServerConfigurationManager configurationManager) /// <param name="loggedInUser">The logged in user.</param>
/// <param name="configurationManager">The configuration manager.</param>
/// <param name="appHost">The app host.</param>
public static void OpenDashboardPage(string page, User loggedInUser, IServerConfigurationManager configurationManager, IServerApplicationHost appHost)
{ {
var url = "http://localhost:" + configurationManager.Configuration.HttpServerPortNumber + "/" + var url = "http://localhost:" + configurationManager.Configuration.HttpServerPortNumber + "/" +
Kernel.Instance.WebApplicationName + "/dashboard/" + page; appHost.WebApplicationName + "/dashboard/" + page;
OpenUrl(url); OpenUrl(url);
} }

View file

@ -40,7 +40,6 @@ using MediaBrowser.Server.Implementations.Providers;
using MediaBrowser.Server.Implementations.ServerManager; using MediaBrowser.Server.Implementations.ServerManager;
using MediaBrowser.Server.Implementations.Session; using MediaBrowser.Server.Implementations.Session;
using MediaBrowser.Server.Implementations.Sqlite; using MediaBrowser.Server.Implementations.Sqlite;
using MediaBrowser.Server.Implementations.Udp;
using MediaBrowser.Server.Implementations.Updates; using MediaBrowser.Server.Implementations.Updates;
using MediaBrowser.Server.Implementations.WebSocket; using MediaBrowser.Server.Implementations.WebSocket;
using MediaBrowser.ServerApplication.Implementations; using MediaBrowser.ServerApplication.Implementations;
@ -50,7 +49,6 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Sockets;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -88,6 +86,28 @@ namespace MediaBrowser.ServerApplication
get { return "Server"; } get { return "Server"; }
} }
/// <summary>
/// Gets the name of the web application that can be used for url building.
/// All api urls will be of the form {protocol}://{host}:{port}/{appname}/...
/// </summary>
/// <value>The name of the web application.</value>
public string WebApplicationName
{
get { return "mediabrowser"; }
}
/// <summary>
/// Gets the HTTP server URL prefix.
/// </summary>
/// <value>The HTTP server URL prefix.</value>
public string HttpServerUrlPrefix
{
get
{
return "http://+:" + ServerConfigurationManager.Configuration.HttpServerPortNumber + "/" + WebApplicationName + "/";
}
}
/// <summary> /// <summary>
/// Gets the configuration manager. /// Gets the configuration manager.
/// </summary> /// </summary>
@ -200,7 +220,7 @@ namespace MediaBrowser.ServerApplication
/// <returns>Task.</returns> /// <returns>Task.</returns>
protected override async Task RegisterResources() protected override async Task RegisterResources()
{ {
ServerKernel = new Kernel(ServerConfigurationManager); ServerKernel = new Kernel();
await base.RegisterResources().ConfigureAwait(false); await base.RegisterResources().ConfigureAwait(false);
@ -261,7 +281,7 @@ namespace MediaBrowser.ServerApplication
HttpServer = await _httpServerCreationTask.ConfigureAwait(false); HttpServer = await _httpServerCreationTask.ConfigureAwait(false);
RegisterSingleInstance(HttpServer, false); RegisterSingleInstance(HttpServer, false);
ServerManager = new ServerManager(this, JsonSerializer, Logger, ServerConfigurationManager, ServerKernel); ServerManager = new ServerManager(this, JsonSerializer, Logger, ServerConfigurationManager);
RegisterSingleInstance(ServerManager); RegisterSingleInstance(ServerManager);
var displayPreferencesTask = Task.Run(async () => await ConfigureDisplayPreferencesRepositories().ConfigureAwait(false)); var displayPreferencesTask = Task.Run(async () => await ConfigureDisplayPreferencesRepositories().ConfigureAwait(false));
@ -279,14 +299,15 @@ namespace MediaBrowser.ServerApplication
/// </summary> /// </summary>
private void SetKernelProperties() private void SetKernelProperties()
{ {
ServerKernel.ImageManager = new ImageManager(ServerKernel, LogManager.GetLogger("ImageManager"),
ApplicationPaths);
Parallel.Invoke( Parallel.Invoke(
() => ServerKernel.FFMpegManager = new FFMpegManager(ApplicationPaths, MediaEncoder, LibraryManager, Logger), () => ServerKernel.FFMpegManager = new FFMpegManager(ApplicationPaths, MediaEncoder, LibraryManager, Logger),
() => ServerKernel.ImageManager = new ImageManager(ServerKernel, LogManager.GetLogger("ImageManager"), ApplicationPaths), () => ServerKernel.WeatherProviders = GetExports<IWeatherProvider>(),
() => ServerKernel.WeatherProviders = GetExports<IWeatherProvider>(), () => ServerKernel.ImageManager.ImageEnhancers = GetExports<IImageEnhancer>().OrderBy(e => e.Priority).ToArray(),
() => ServerKernel.ImageEnhancers = GetExports<IImageEnhancer>().OrderBy(e => e.Priority).ToArray(), () => LocalizedStrings.StringFiles = GetExports<LocalizedStringData>(),
() => ServerKernel.StringFiles = GetExports<LocalizedStringData>(), SetStaticProperties
SetStaticProperties );
);
} }
/// <summary> /// <summary>
@ -364,20 +385,16 @@ namespace MediaBrowser.ServerApplication
ServerManager.AddWebSocketListeners(GetExports<IWebSocketListener>(false)); ServerManager.AddWebSocketListeners(GetExports<IWebSocketListener>(false));
StartServer(true); StartServer(true);
Parallel.Invoke(
() => LibraryManager.AddParts(GetExports<IResolverIgnoreRule>(), LibraryManager.AddParts(GetExports<IResolverIgnoreRule>(),
GetExports<IVirtualFolderCreator>(), GetExports<IVirtualFolderCreator>(),
GetExports<IItemResolver>(), GetExports<IItemResolver>(),
GetExports<IIntroProvider>(), GetExports<IIntroProvider>(),
GetExports<IBaseItemComparer>(), GetExports<IBaseItemComparer>(),
GetExports<ILibraryPrescanTask>(), GetExports<ILibraryPrescanTask>(),
GetExports<ILibraryPostScanTask>()), GetExports<ILibraryPostScanTask>());
() => ProviderManager.AddMetadataProviders(GetExports<BaseMetadataProvider>().ToArray()) ProviderManager.AddMetadataProviders(GetExports<BaseMetadataProvider>().ToArray());
);
} }
/// <summary> /// <summary>
@ -414,7 +431,7 @@ namespace MediaBrowser.ServerApplication
{ {
base.OnConfigurationUpdated(sender, e); base.OnConfigurationUpdated(sender, e);
if (!string.Equals(HttpServer.UrlPrefix, ServerKernel.HttpServerUrlPrefix, StringComparison.OrdinalIgnoreCase)) if (!string.Equals(HttpServer.UrlPrefix, HttpServerUrlPrefix, StringComparison.OrdinalIgnoreCase))
{ {
NotifyPendingRestart(); NotifyPendingRestart();
} }
@ -553,7 +570,7 @@ namespace MediaBrowser.ServerApplication
FileName = tmpFile, FileName = tmpFile,
Arguments = string.Format("{0} {1} {2} {3}", ServerConfigurationManager.Configuration.HttpServerPortNumber, Arguments = string.Format("{0} {1} {2} {3}", ServerConfigurationManager.Configuration.HttpServerPortNumber,
ServerKernel.HttpServerUrlPrefix, HttpServerUrlPrefix,
UdpServerPort, UdpServerPort,
ServerConfigurationManager.Configuration.LegacyWebSocketPortNumber), ServerConfigurationManager.Configuration.LegacyWebSocketPortNumber),

View file

@ -1,4 +1,4 @@
using MediaBrowser.Common; using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Plugins;
@ -17,7 +17,7 @@ namespace MediaBrowser.ServerApplication.EntryPoints
/// <summary> /// <summary>
/// The _app host /// The _app host
/// </summary> /// </summary>
private readonly IApplicationHost _appHost; private readonly IServerApplicationHost _appHost;
/// <summary> /// <summary>
/// The _user manager /// The _user manager
/// </summary> /// </summary>
@ -31,7 +31,7 @@ namespace MediaBrowser.ServerApplication.EntryPoints
/// </summary> /// </summary>
/// <param name="appHost">The app host.</param> /// <param name="appHost">The app host.</param>
/// <param name="userManager">The user manager.</param> /// <param name="userManager">The user manager.</param>
public StartupWizard(IApplicationHost appHost, IUserManager userManager, IServerConfigurationManager configurationManager) public StartupWizard(IServerApplicationHost appHost, IUserManager userManager, IServerConfigurationManager configurationManager)
{ {
_appHost = appHost; _appHost = appHost;
_userManager = userManager; _userManager = userManager;
@ -58,7 +58,7 @@ namespace MediaBrowser.ServerApplication.EntryPoints
try try
{ {
App.OpenDashboardPage("wizardStart.html", user, _configurationManager); App.OpenDashboardPage("wizardStart.html", user, _configurationManager, _appHost);
} }
catch (Win32Exception ex) catch (Win32Exception ex)
{ {

View file

@ -29,7 +29,7 @@ namespace MediaBrowser.ServerApplication
/// <summary> /// <summary>
/// The _app host /// The _app host
/// </summary> /// </summary>
private readonly IApplicationHost _appHost; private readonly IServerApplicationHost _appHost;
/// <summary> /// <summary>
/// The _log manager /// The _log manager
@ -57,7 +57,7 @@ namespace MediaBrowser.ServerApplication
/// <param name="jsonSerializer">The json serializer.</param> /// <param name="jsonSerializer">The json serializer.</param>
/// <param name="displayPreferencesManager">The display preferences manager.</param> /// <param name="displayPreferencesManager">The display preferences manager.</param>
/// <exception cref="System.ArgumentNullException">logger</exception> /// <exception cref="System.ArgumentNullException">logger</exception>
public MainWindow(ILogManager logManager, IApplicationHost appHost, IServerConfigurationManager configurationManager, IUserManager userManager, ILibraryManager libraryManager, IJsonSerializer jsonSerializer, IDisplayPreferencesManager displayPreferencesManager) public MainWindow(ILogManager logManager, IServerApplicationHost appHost, IServerConfigurationManager configurationManager, IUserManager userManager, ILibraryManager libraryManager, IJsonSerializer jsonSerializer, IDisplayPreferencesManager displayPreferencesManager)
{ {
if (logManager == null) if (logManager == null)
{ {
@ -189,13 +189,13 @@ namespace MediaBrowser.ServerApplication
void cmdApiDocs_Click(object sender, EventArgs e) void cmdApiDocs_Click(object sender, EventArgs e)
{ {
App.OpenUrl("http://localhost:" + _configurationManager.Configuration.HttpServerPortNumber + "/" + App.OpenUrl("http://localhost:" + _configurationManager.Configuration.HttpServerPortNumber + "/" +
Kernel.Instance.WebApplicationName + "/metadata"); _appHost.WebApplicationName + "/metadata");
} }
void cmdSwaggerApiDocs_Click(object sender, EventArgs e) void cmdSwaggerApiDocs_Click(object sender, EventArgs e)
{ {
App.OpenUrl("http://localhost:" + _configurationManager.Configuration.HttpServerPortNumber + "/" + App.OpenUrl("http://localhost:" + _configurationManager.Configuration.HttpServerPortNumber + "/" +
Kernel.Instance.WebApplicationName + "/swagger-ui/index.html"); _appHost.WebApplicationName + "/swagger-ui/index.html");
} }
void cmdGithubWiki_Click(object sender, EventArgs e) void cmdGithubWiki_Click(object sender, EventArgs e)
@ -254,7 +254,7 @@ namespace MediaBrowser.ServerApplication
/// </summary> /// </summary>
private void OpenDashboard(User loggedInUser) private void OpenDashboard(User loggedInUser)
{ {
App.OpenDashboardPage("dashboard.html", loggedInUser, _configurationManager); App.OpenDashboardPage("dashboard.html", loggedInUser, _configurationManager, _appHost);
} }
/// <summary> /// <summary>
@ -275,7 +275,7 @@ namespace MediaBrowser.ServerApplication
private void cmdBrowseLibrary_click(object sender, RoutedEventArgs e) private void cmdBrowseLibrary_click(object sender, RoutedEventArgs e)
{ {
var user = _userManager.Users.FirstOrDefault(u => u.Configuration.IsAdministrator); var user = _userManager.Users.FirstOrDefault(u => u.Configuration.IsAdministrator);
App.OpenDashboardPage("index.html", user, _configurationManager); App.OpenDashboardPage("index.html", user, _configurationManager, _appHost);
} }
/// <summary> /// <summary>