aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2021-03-03 09:09:57 +0100
committercvium <clausvium@gmail.com>2021-03-03 09:09:57 +0100
commit664c5da31728e65d0e53ada7c06c918059f73615 (patch)
tree378c3bd7128049622ad1ba7a89927391713e6a2f /MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
parent8f99bdd07ce037b633993f06f5a68dcb293d6828 (diff)
return false when providerid is null or empty
Diffstat (limited to 'MediaBrowser.Model/Entities/ProviderIdsExtensions.cs')
-rw-r--r--MediaBrowser.Model/Entities/ProviderIdsExtensions.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
index bde5a1da1..571bc7006 100644
--- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
+++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
@@ -50,13 +50,15 @@ namespace MediaBrowser.Model.Entities
throw new ArgumentNullException(nameof(instance));
}
- if (instance.ProviderIds == null)
+ var foundProviderId = instance.ProviderIds.TryGetValue(name, out id);
+ // This occurs when searching with Identify (and possibly in other places)
+ if (string.IsNullOrEmpty(id))
{
id = null;
- return false;
+ foundProviderId = false;
}
- return instance.ProviderIds.TryGetValue(name, out id);
+ return foundProviderId;
}
/// <summary>