update image provider

This commit is contained in:
Luke Pulverenti 2015-11-20 12:55:38 -05:00
parent 7568970fd6
commit 625a089737
3 changed files with 24 additions and 4 deletions

View file

@ -128,7 +128,14 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
DeleteEmptyFolders(directory);
if (!_fileSystem.GetFileSystemEntryPaths(directory).Any())
{
_fileSystem.DeleteDirectory(directory, false);
try
{
_fileSystem.DeleteDirectory(directory, false);
}
catch (IOException ex)
{
_logger.ErrorException("Error deleting directory {0}", ex, directory);
}
}
}
}

View file

@ -222,7 +222,6 @@ namespace MediaBrowser.Model.Configuration
public string[] Migrations { get; set; }
public int MigrationVersion { get; set; }
public bool EnableImagePreDownloading { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.

View file

@ -516,11 +516,25 @@ namespace MediaBrowser.Providers.Manager
var hasDualAccess = item as IHasDualAccess;
if (hasDualAccess == null || hasDualAccess.IsAccessedByName)
{
return !_config.Configuration.EnableImagePreDownloading;
return true;
}
}
return false;
switch (type)
{
case ImageType.Primary:
return false;
case ImageType.Thumb:
return false;
case ImageType.Logo:
return false;
case ImageType.Backdrop:
return false;
case ImageType.Screenshot:
return false;
default:
return true;
}
}
private void SaveImageStub(IHasImages item, ImageType imageType, string url)