download studio/genre images

pull/702/head
Luke Pulverenti 11 years ago
parent 9dff8e9d38
commit 6cfd21122b

@ -54,6 +54,12 @@ namespace MediaBrowser.Providers.ImagesByName
return false;
}
// Try again periodically in case new images were added
if ((DateTime.UtcNow - providerInfo.LastRefreshed).TotalDays > 14)
{
return true;
}
return base.NeedsRefreshInternal(item, providerInfo);
}
@ -69,7 +75,7 @@ namespace MediaBrowser.Providers.ImagesByName
{
get
{
return "6";
return "8";
}
}

@ -45,7 +45,7 @@ namespace MediaBrowser.Providers.ImagesByName
public Task<IEnumerable<RemoteImageInfo>> GetImages(IHasImages item, ImageType imageType, CancellationToken cancellationToken)
{
return GetImages(item, imageType == ImageType.Primary, imageType == ImageType.Backdrop, cancellationToken);
return GetImages(item, imageType == ImageType.Primary, imageType == ImageType.Thumb, cancellationToken);
}
public Task<IEnumerable<RemoteImageInfo>> GetAllImages(IHasImages item, CancellationToken cancellationToken)
@ -53,7 +53,7 @@ namespace MediaBrowser.Providers.ImagesByName
return GetImages(item, true, true, cancellationToken);
}
private async Task<IEnumerable<RemoteImageInfo>> GetImages(IHasImages item, bool posters, bool backdrops, CancellationToken cancellationToken)
private async Task<IEnumerable<RemoteImageInfo>> GetImages(IHasImages item, bool posters, bool thumbs, CancellationToken cancellationToken)
{
var list = new List<RemoteImageInfo>();
@ -68,7 +68,7 @@ namespace MediaBrowser.Providers.ImagesByName
cancellationToken.ThrowIfCancellationRequested();
if (backdrops)
if (thumbs)
{
var thumbsPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotegenrethumbs.txt");

@ -73,7 +73,10 @@ namespace MediaBrowser.Providers.ImagesByName
{
var text = reader.ReadLine();
lines.Add(text);
if (!string.IsNullOrWhiteSpace(text))
{
lines.Add(text);
}
}
return lines;

@ -54,6 +54,12 @@ namespace MediaBrowser.Providers.ImagesByName
return false;
}
// Try again periodically in case new images were added
if ((DateTime.UtcNow - providerInfo.LastRefreshed).TotalDays > 14)
{
return true;
}
return base.NeedsRefreshInternal(item, providerInfo);
}

@ -45,7 +45,7 @@ namespace MediaBrowser.Providers.ImagesByName
public Task<IEnumerable<RemoteImageInfo>> GetImages(IHasImages item, ImageType imageType, CancellationToken cancellationToken)
{
return GetImages(item, imageType == ImageType.Primary, imageType == ImageType.Backdrop, cancellationToken);
return GetImages(item, imageType == ImageType.Primary, imageType == ImageType.Thumb, cancellationToken);
}
public Task<IEnumerable<RemoteImageInfo>> GetAllImages(IHasImages item, CancellationToken cancellationToken)
@ -53,7 +53,7 @@ namespace MediaBrowser.Providers.ImagesByName
return GetImages(item, true, true, cancellationToken);
}
private async Task<IEnumerable<RemoteImageInfo>> GetImages(IHasImages item, bool posters, bool backdrops, CancellationToken cancellationToken)
private async Task<IEnumerable<RemoteImageInfo>> GetImages(IHasImages item, bool posters, bool thumbs, CancellationToken cancellationToken)
{
var list = new List<RemoteImageInfo>();
@ -68,7 +68,7 @@ namespace MediaBrowser.Providers.ImagesByName
cancellationToken.ThrowIfCancellationRequested();
if (backdrops)
if (thumbs)
{
var thumbsPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudiothumbs.txt");

Loading…
Cancel
Save