aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Devices
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2021-10-02 14:06:00 -0400
committerPatrick Barron <barronpm@gmail.com>2021-10-03 21:41:22 -0400
commit6cc69b80b6cf9310e9503c82c0c22bfc9120ec9e (patch)
treea5d6a318f3555c6878b18c34bb37e14553a2b2da /Emby.Server.Implementations/Devices
parent80223c548c43acabf07a581393ea45e7f165eeef (diff)
Fix warnings in DeviceId
Diffstat (limited to 'Emby.Server.Implementations/Devices')
-rw-r--r--Emby.Server.Implementations/Devices/DeviceId.cs21
1 files changed, 10 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/Devices/DeviceId.cs b/Emby.Server.Implementations/Devices/DeviceId.cs
index 3d15b3e76..0cfced8be 100644
--- a/Emby.Server.Implementations/Devices/DeviceId.cs
+++ b/Emby.Server.Implementations/Devices/DeviceId.cs
@@ -15,9 +15,18 @@ namespace Emby.Server.Implementations.Devices
{
private readonly IApplicationPaths _appPaths;
private readonly ILogger<DeviceId> _logger;
-
private readonly object _syncLock = new object();
+ private string _id;
+
+ public DeviceId(IApplicationPaths appPaths, ILoggerFactory loggerFactory)
+ {
+ _appPaths = appPaths;
+ _logger = loggerFactory.CreateLogger<DeviceId>();
+ }
+
+ public string Value => _id ?? (_id = GetDeviceId());
+
private string CachePath => Path.Combine(_appPaths.DataPath, "device.txt");
private string GetCachedId()
@@ -86,15 +95,5 @@ namespace Emby.Server.Implementations.Devices
return id;
}
-
- private string _id;
-
- public DeviceId(IApplicationPaths appPaths, ILoggerFactory loggerFactory)
- {
- _appPaths = appPaths;
- _logger = loggerFactory.CreateLogger<DeviceId>();
- }
-
- public string Value => _id ?? (_id = GetDeviceId());
}
}