diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-10-06 10:47:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-06 10:47:40 +0200 |
| commit | a1246ba3a080cc20ff1c8e64b39a501065cc39b0 (patch) | |
| tree | cec616f27606c5ab0e217f5192eb3e2a5e582a20 /Emby.Server.Implementations/Devices/DeviceId.cs | |
| parent | d245e45254057c62d058cfad3e56484a77093718 (diff) | |
| parent | e0db541381a669ff5ba618e618e162ba0d0ef1c9 (diff) | |
Merge pull request #6649 from barronpm/implementations-warn2
Diffstat (limited to 'Emby.Server.Implementations/Devices/DeviceId.cs')
| -rw-r--r-- | Emby.Server.Implementations/Devices/DeviceId.cs | 21 |
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()); } } |
