mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-08 23:00:51 +02:00
update image provider
This commit is contained in:
parent
7568970fd6
commit
625a089737
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue