remove need to pass in image index when adding backdrops

This commit is contained in:
Luke Pulverenti
2013-11-07 11:48:23 -05:00
parent 2fc662c9e9
commit 01f1ed05b9
11 changed files with 93 additions and 46 deletions

View File

@@ -70,6 +70,15 @@ namespace MediaBrowser.Server.Implementations.Providers
throw new ArgumentNullException("mimeType");
}
if (type == ImageType.Backdrop && imageIndex == null)
{
imageIndex = item.BackdropImagePaths.Count;
}
else if (type == ImageType.Screenshot && imageIndex == null)
{
imageIndex = item.ScreenshotImagePaths.Count;
}
var saveLocally = _config.Configuration.SaveLocalMeta && item.Parent != null && !(item is Audio);
if (item is IItemByName || item is User)