|
|
@ -329,7 +329,12 @@ namespace MediaBrowser.Providers.TV
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private SemaphoreSlim _ensureSemaphore = new SemaphoreSlim(1,1);
|
|
|
|
internal async Task<string> EnsureSeriesInfo(Dictionary<string, string> seriesProviderIds, string preferredMetadataLanguage, CancellationToken cancellationToken)
|
|
|
|
internal async Task<string> EnsureSeriesInfo(Dictionary<string, string> seriesProviderIds, string preferredMetadataLanguage, CancellationToken cancellationToken)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await _ensureSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string seriesId;
|
|
|
|
string seriesId;
|
|
|
|
if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out seriesId))
|
|
|
|
if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out seriesId))
|
|
|
@ -362,6 +367,11 @@ namespace MediaBrowser.Providers.TV
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
finally
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_ensureSemaphore.Release();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool IsCacheValid(string seriesDataPath, string preferredMetadataLanguage)
|
|
|
|
private bool IsCacheValid(string seriesDataPath, string preferredMetadataLanguage)
|
|
|
|
{
|
|
|
|
{
|
|
|
|