aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-05 22:25:23 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-05 22:25:23 -0500
commit01be627d8bf329655b580d220dc62fe9906519fa (patch)
tree10669c59e1e50147f4c1320030a86ec9fa64c288 /MediaBrowser.Common.Implementations
parent00b515099966ed416b98789d72b955384224c27c (diff)
sync updates
Diffstat (limited to 'MediaBrowser.Common.Implementations')
-rw-r--r--MediaBrowser.Common.Implementations/BaseApplicationHost.cs2
-rw-r--r--MediaBrowser.Common.Implementations/Devices/DeviceId.cs24
2 files changed, 3 insertions, 23 deletions
diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs
index 4de1adcfa..3e25bb626 100644
--- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs
+++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs
@@ -186,7 +186,7 @@ namespace MediaBrowser.Common.Implementations
{
if (_deviceId == null)
{
- _deviceId = new DeviceId(ApplicationPaths, LogManager.GetLogger("SystemId"), NetworkManager);
+ _deviceId = new DeviceId(ApplicationPaths, LogManager.GetLogger("SystemId"));
}
return _deviceId.Value;
diff --git a/MediaBrowser.Common.Implementations/Devices/DeviceId.cs b/MediaBrowser.Common.Implementations/Devices/DeviceId.cs
index 7c0dc1e1f..2a1c8877d 100644
--- a/MediaBrowser.Common.Implementations/Devices/DeviceId.cs
+++ b/MediaBrowser.Common.Implementations/Devices/DeviceId.cs
@@ -1,6 +1,4 @@
using MediaBrowser.Common.Configuration;
-using MediaBrowser.Common.Extensions;
-using MediaBrowser.Common.Net;
using MediaBrowser.Model.Logging;
using System;
using System.IO;
@@ -11,7 +9,6 @@ namespace MediaBrowser.Common.Implementations.Devices
public class DeviceId
{
private readonly IApplicationPaths _appPaths;
- private readonly INetworkManager _networkManager;
private readonly ILogger _logger;
private readonly object _syncLock = new object();
@@ -73,23 +70,7 @@ namespace MediaBrowser.Common.Implementations.Devices
private string GetNewId()
{
- // When generating an Id, base it off of the app path + mac address
- // But we can't fail here, so if we can't get the mac address then just use a random guid
-
- string mac;
-
- try
- {
- mac = _networkManager.GetMacAddress();
- }
- catch
- {
- mac = Guid.NewGuid().ToString("N");
- }
-
- mac += "-" + _appPaths.ApplicationPath;
-
- return mac.GetMD5().ToString("N");
+ return Guid.NewGuid().ToString("N");
}
private string GetDeviceId()
@@ -107,11 +88,10 @@ namespace MediaBrowser.Common.Implementations.Devices
private string _id;
- public DeviceId(IApplicationPaths appPaths, ILogger logger, INetworkManager networkManager)
+ public DeviceId(IApplicationPaths appPaths, ILogger logger)
{
_appPaths = appPaths;
_logger = logger;
- _networkManager = networkManager;
}
public string Value