adjust provider caching

pull/702/head
Luke Pulverenti 9 years ago
parent 788d302e41
commit b5a7483fcc

@ -297,12 +297,6 @@ namespace MediaBrowser.Providers.Music
ResourcePool = _musicBrainzResourcePool
};
if (!isSearch)
{
options.CacheMode = CacheMode.Unconditional;
options.CacheLength = TimeSpan.FromDays(3);
}
using (var xml = await _httpClient.Get(options).ConfigureAwait(false))
{
using (var oReader = new StreamReader(xml, Encoding.UTF8))

@ -99,9 +99,7 @@ namespace MediaBrowser.Providers.Omdb
{
Url = url,
ResourcePool = OmdbProvider.ResourcePool,
CancellationToken = cancellationToken,
CacheMode = CacheMode.Unconditional,
CacheLength = TimeSpan.FromDays(2)
CancellationToken = cancellationToken
}).ConfigureAwait(false))
{
@ -133,7 +131,7 @@ namespace MediaBrowser.Providers.Omdb
item.SetProviderId(MetadataProviders.Imdb, result.imdbID);
int parsedYear;
if (result.Year.Length > 0
if (result.Year.Length > 0
&& int.TryParse(result.Year.Substring(0, Math.Min(result.Year.Length, 4)), NumberStyles.Any, CultureInfo.InvariantCulture, out parsedYear))
{
item.ProductionYear = parsedYear;

@ -43,9 +43,7 @@ namespace MediaBrowser.Providers.Omdb
{
Url = url,
ResourcePool = ResourcePool,
CancellationToken = cancellationToken,
CacheMode = CacheMode.Unconditional,
CacheLength = TimeSpan.FromDays(7)
CancellationToken = cancellationToken
}).ConfigureAwait(false))
{

Loading…
Cancel
Save