return false when providerid is null or empty

This commit is contained in:
cvium
2021-03-03 09:09:57 +01:00
parent 8f99bdd07c
commit 664c5da317
2 changed files with 9 additions and 7 deletions

View File

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