mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
update image provider
This commit is contained in:
parent
7568970fd6
commit
625a089737
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user