diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Devices/DeviceManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Devices/DeviceManager.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs b/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs index ddd5ef58d..e057ec5cd 100644 --- a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs +++ b/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs @@ -100,11 +100,16 @@ namespace MediaBrowser.Server.Implementations.Devices devices = devices.Where(i => GetCapabilities(i.Id).SupportsSync == val); } - if (query.SupportsUniqueIdentifier.HasValue) + if (query.SupportsPersistentIdentifier.HasValue) { - var val = query.SupportsUniqueIdentifier.Value; + var val = query.SupportsPersistentIdentifier.Value; - devices = devices.Where(i => GetCapabilities(i.Id).SupportsUniqueIdentifier == val); + devices = devices.Where(i => + { + var caps = GetCapabilities(i.Id); + var deviceVal = caps.SupportsUniqueIdentifier ?? caps.SupportsPersistentIdentifier; + return deviceVal == val; + }); } if (!string.IsNullOrWhiteSpace(query.UserId)) @@ -212,7 +217,7 @@ namespace MediaBrowser.Server.Implementations.Devices { var capabilities = GetCapabilities(deviceId); - if (capabilities.SupportsUniqueIdentifier) + if (capabilities != null && capabilities.SupportsPersistentIdentifier) { return false; } |
