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

@ -127,9 +127,16 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
{ {
DeleteEmptyFolders(directory); DeleteEmptyFolders(directory);
if (!_fileSystem.GetFileSystemEntryPaths(directory).Any()) if (!_fileSystem.GetFileSystemEntryPaths(directory).Any())
{
try
{ {
_fileSystem.DeleteDirectory(directory, false); _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 string[] Migrations { get; set; }
public int MigrationVersion { get; set; } public int MigrationVersion { get; set; }
public bool EnableImagePreDownloading { get; set; }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class. /// 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; var hasDualAccess = item as IHasDualAccess;
if (hasDualAccess == null || hasDualAccess.IsAccessedByName) if (hasDualAccess == null || hasDualAccess.IsAccessedByName)
{ {
return !_config.Configuration.EnableImagePreDownloading; return true;
} }
} }
switch (type)
{
case ImageType.Primary:
return false; 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) private void SaveImageStub(IHasImages item, ImageType imageType, string url)