diff options
| author | cvium <clausvium@gmail.com> | 2021-03-03 09:09:57 +0100 |
|---|---|---|
| committer | cvium <clausvium@gmail.com> | 2021-03-03 09:09:57 +0100 |
| commit | 664c5da31728e65d0e53ada7c06c918059f73615 (patch) | |
| tree | 378c3bd7128049622ad1ba7a89927391713e6a2f /MediaBrowser.Model/Entities/ProviderIdsExtensions.cs | |
| parent | 8f99bdd07ce037b633993f06f5a68dcb293d6828 (diff) | |
return false when providerid is null or empty
Diffstat (limited to 'MediaBrowser.Model/Entities/ProviderIdsExtensions.cs')
| -rw-r--r-- | MediaBrowser.Model/Entities/ProviderIdsExtensions.cs | 8 |
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> |
