mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
fix current image deletion in image saver
This commit is contained in:
parent
f238005d2b
commit
f593230e44
@ -133,6 +133,9 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
source = memoryStream;
|
source = memoryStream;
|
||||||
|
|
||||||
var currentImage = GetCurrentImage(item, type, index);
|
var currentImage = GetCurrentImage(item, type, index);
|
||||||
|
var currentImageIsLocalFile = currentImage != null && currentImage.IsLocalFile;
|
||||||
|
var currentImagePath = currentImage == null ? null : currentImage.Path;
|
||||||
|
|
||||||
var savedPaths = new List<string>();
|
var savedPaths = new List<string>();
|
||||||
|
|
||||||
using (source)
|
using (source)
|
||||||
@ -157,9 +160,9 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
SetImagePath(item, type, imageIndex, savedPaths[0]);
|
SetImagePath(item, type, imageIndex, savedPaths[0]);
|
||||||
|
|
||||||
// Delete the current path
|
// Delete the current path
|
||||||
if (currentImage != null && currentImage.IsLocalFile && !savedPaths.Contains(currentImage.Path, StringComparer.OrdinalIgnoreCase))
|
if (currentImageIsLocalFile && !savedPaths.Contains(currentImagePath, StringComparer.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
var currentPath = currentImage.Path;
|
var currentPath = currentImagePath;
|
||||||
|
|
||||||
_logger.Debug("Deleting previous image {0}", currentPath);
|
_logger.Debug("Deleting previous image {0}", currentPath);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user