mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
Clean up checks for Dictionary keys
This commit is contained in:
parent
1e0967f43c
commit
421092b478
@ -170,11 +170,16 @@ namespace MediaBrowser.Providers.TV.TheTVDB
|
|||||||
return result?.Data.First().Id.ToString();
|
return result?.Data.First().Id.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Check whether a dictionary of provider IDs includes an entry for a valid TV metadata provider.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="seriesProviderIds">The dictionary to check.</param>
|
||||||
|
/// <returns>True, if the dictionary contains a valid TV provider ID, otherwise false.</returns>
|
||||||
internal static bool IsValidSeries(Dictionary<string, string> seriesProviderIds)
|
internal static bool IsValidSeries(Dictionary<string, string> seriesProviderIds)
|
||||||
{
|
{
|
||||||
return seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out _) ||
|
return seriesProviderIds.ContainsKey(MetadataProviders.Tvdb.ToString()) ||
|
||||||
seriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out _) ||
|
seriesProviderIds.ContainsKey(MetadataProviders.Imdb.ToString()) ||
|
||||||
seriesProviderIds.TryGetValue(MetadataProviders.Zap2It.ToString(), out _);
|
seriesProviderIds.ContainsKey(MetadataProviders.Zap2It.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user