fixed image uploading for virtual items

This commit is contained in:
Luke Pulverenti
2013-05-18 13:07:20 -04:00
parent 032bf6b8c6
commit 4cd7030248
4 changed files with 15 additions and 9 deletions

View File

@@ -361,7 +361,7 @@ namespace MediaBrowser.Api.Images
index++;
}
index = 0;
foreach (var image in item.ScreenshotImagePaths)
@@ -422,7 +422,7 @@ namespace MediaBrowser.Api.Images
return list;
}
/// <summary>
/// Gets the specified request.
/// </summary>
@@ -765,7 +765,7 @@ namespace MediaBrowser.Api.Images
}
// Don't save locally if there's no parent (special feature, trailer, etc)
var saveLocally = (!(entity is Audio) && entity.Parent != null && !string.IsNullOrEmpty(entity.MetaLocation)) || entity is User;
var saveLocally = !(entity is Audio) && entity.Parent != null && !string.IsNullOrEmpty(entity.MetaLocation) || entity is User;
if (imageType != ImageType.Primary)
{
@@ -775,6 +775,11 @@ namespace MediaBrowser.Api.Images
}
}
if (entity.LocationType != LocationType.FileSystem)
{
saveLocally = false;
}
var imagePath = _providerManager.GetSavePath(entity, filename + "." + extension, saveLocally);
// Save to file system