sync updates

This commit is contained in:
Luke Pulverenti
2015-01-20 00:19:13 -05:00
parent 4ea72584db
commit 1d5f1bc474
22 changed files with 146 additions and 74 deletions

View File

@@ -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;
}