aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna
diff options
context:
space:
mode:
authorVasily <JustAMan@users.noreply.github.com>2019-03-13 00:01:00 +0300
committerGitHub <noreply@github.com>2019-03-13 00:01:00 +0300
commit297f25cfc239c30136f08e118a5f43fa0596ec35 (patch)
treeedbb6f1c4d8238e7f4264424b5b6103d8d888cc0 /Emby.Dlna
parent6751560228d8d48970ab5ae51f0f73c505f8e137 (diff)
parentdecaffed86cbc5db99c3f79d266fdfcdd262c12d (diff)
Merge pull request #1059 from Bond-009/os
Remove EnvironmentInfo
Diffstat (limited to 'Emby.Dlna')
-rw-r--r--Emby.Dlna/Main/DlnaEntryPoint.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs
index be2eb53137..5fbe70dedb 100644
--- a/Emby.Dlna/Main/DlnaEntryPoint.cs
+++ b/Emby.Dlna/Main/DlnaEntryPoint.cs
@@ -22,6 +22,7 @@ using MediaBrowser.Model.System;
using Microsoft.Extensions.Logging;
using Rssdp;
using Rssdp.Infrastructure;
+using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
namespace Emby.Dlna.Main
{
@@ -48,7 +49,6 @@ namespace Emby.Dlna.Main
private SsdpDevicePublisher _Publisher;
private readonly ISocketFactory _socketFactory;
- private readonly IEnvironmentInfo _environmentInfo;
private readonly INetworkManager _networkManager;
private ISsdpCommunicationsServer _communicationsServer;
@@ -74,7 +74,6 @@ namespace Emby.Dlna.Main
IDeviceDiscovery deviceDiscovery,
IMediaEncoder mediaEncoder,
ISocketFactory socketFactory,
- IEnvironmentInfo environmentInfo,
INetworkManager networkManager,
IUserViewManager userViewManager,
ITVSeriesManager tvSeriesManager)
@@ -93,7 +92,6 @@ namespace Emby.Dlna.Main
_deviceDiscovery = deviceDiscovery;
_mediaEncoder = mediaEncoder;
_socketFactory = socketFactory;
- _environmentInfo = environmentInfo;
_networkManager = networkManager;
_logger = loggerFactory.CreateLogger("Dlna");
@@ -166,8 +164,8 @@ namespace Emby.Dlna.Main
{
if (_communicationsServer == null)
{
- var enableMultiSocketBinding = _environmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows ||
- _environmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Linux;
+ var enableMultiSocketBinding = OperatingSystem.Id == OperatingSystemId.Windows ||
+ OperatingSystem.Id == OperatingSystemId.Linux;
_communicationsServer = new SsdpCommunicationsServer(_config, _socketFactory, _networkManager, _logger, enableMultiSocketBinding)
{
@@ -227,7 +225,7 @@ namespace Emby.Dlna.Main
try
{
- _Publisher = new SsdpDevicePublisher(_communicationsServer, _networkManager, _environmentInfo.OperatingSystemName, _environmentInfo.OperatingSystemVersion, _config.GetDlnaConfiguration().SendOnlyMatchedHost);
+ _Publisher = new SsdpDevicePublisher(_communicationsServer, _networkManager, OperatingSystem.Name, Environment.OSVersion.VersionString, _config.GetDlnaConfiguration().SendOnlyMatchedHost);
_Publisher.LogFunction = LogMessage;
_Publisher.SupportPnpRootDevice = false;