aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-24 14:03:55 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-24 14:03:55 -0500
commitee00f8bf726ae5498d64cff0086b9b7e638936ea (patch)
tree710a5b4b715e5fbf1574bc072c4f299e7c9826ff /MediaBrowser.Server.Startup.Common
parent1af651bc56025935cebe2762d6f36be41530eba1 (diff)
added HasSyncJob
Diffstat (limited to 'MediaBrowser.Server.Startup.Common')
-rw-r--r--MediaBrowser.Server.Startup.Common/ApplicationHost.cs41
1 files changed, 24 insertions, 17 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
index 439d74ab9..5726e1755 100644
--- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
+++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
@@ -446,7 +446,7 @@ namespace MediaBrowser.Server.Startup.Common
SyncManager = new SyncManager(LibraryManager, SyncRepository, ImageProcessor, LogManager.GetLogger("SyncManager"), UserManager, () => DtoService, this, TVSeriesManager, () => MediaEncoder, FileSystemManager, () => SubtitleEncoder, ServerConfigurationManager);
RegisterSingleInstance(SyncManager);
- DtoService = new DtoService(Logger, LibraryManager, UserDataManager, ItemRepository, ImageProcessor, ServerConfigurationManager, FileSystemManager, ProviderManager, () => ChannelManager, SyncManager, this);
+ DtoService = new DtoService(Logger, LibraryManager, UserDataManager, ItemRepository, ImageProcessor, ServerConfigurationManager, FileSystemManager, ProviderManager, () => ChannelManager, SyncManager, this, () => DeviceManager);
RegisterSingleInstance(DtoService);
var encryptionManager = new EncryptionManager();
@@ -490,7 +490,7 @@ namespace MediaBrowser.Server.Startup.Common
LiveTvManager = new LiveTvManager(this, ServerConfigurationManager, FileSystemManager, Logger, ItemRepository, ImageProcessor, UserDataManager, DtoService, UserManager, LibraryManager, TaskManager, LocalizationManager, JsonSerializer);
RegisterSingleInstance(LiveTvManager);
- UserViewManager = new UserViewManager(LibraryManager, LocalizationManager, FileSystemManager, UserManager, ChannelManager, LiveTvManager, ApplicationPaths, playlistManager);
+ UserViewManager = new UserViewManager(LibraryManager, LocalizationManager, UserManager, ChannelManager, LiveTvManager, playlistManager, CollectionManager, ServerConfigurationManager);
RegisterSingleInstance(UserViewManager);
var contentDirectory = new ContentDirectory(dlnaManager, UserDataManager, ImageProcessor, LibraryManager, ServerConfigurationManager, UserManager, LogManager.GetLogger("UpnpContentDirectory"), HttpClient, LocalizationManager, ChannelManager);
@@ -1019,7 +1019,7 @@ namespace MediaBrowser.Server.Startup.Common
IsRunningAsService = IsRunningAsService,
SupportsRunningAsService = SupportsRunningAsService,
ServerName = FriendlyName,
- LocalAddress = GetLocalIpAddress()
+ LocalAddress = LocalApiUrl
};
}
@@ -1036,26 +1036,33 @@ namespace MediaBrowser.Server.Startup.Common
get { return !string.IsNullOrWhiteSpace(HttpServer.CertificatePath); }
}
- /// <summary>
- /// Gets the local ip address.
- /// </summary>
- /// <returns>System.String.</returns>
- private string GetLocalIpAddress()
+ public string LocalApiUrl
{
- // Return the first matched address, if found, or the first known local address
- var address = HttpServerIpAddresses.FirstOrDefault();
-
- if (!string.IsNullOrWhiteSpace(address))
+ get
{
- address = string.Format("http://{0}:{1}",
- address,
- HttpPort.ToString(CultureInfo.InvariantCulture));
+ // Return the first matched address, if found, or the first known local address
+ var address = LocalIpAddress;
+
+ if (!string.IsNullOrWhiteSpace(address))
+ {
+ address = string.Format("http://{0}:{1}",
+ address,
+ HttpPort.ToString(CultureInfo.InvariantCulture));
+ }
+
+ return address;
}
+ }
- return address;
+ public string LocalIpAddress
+ {
+ get
+ {
+ return HttpServerIpAddresses.FirstOrDefault();
+ }
}
- public IEnumerable<string> HttpServerIpAddresses
+ private IEnumerable<string> HttpServerIpAddresses
{
get
{