fix images saving with incorrect paths.

This commit is contained in:
Luke Pulverenti
2013-10-22 21:11:56 -04:00
parent c997effcb1
commit 77cff18dce
5 changed files with 62 additions and 53 deletions

View File

@@ -362,6 +362,8 @@ namespace MediaBrowser.Server.Implementations.Providers
extension = "jpg";
}
extension = "." + extension.ToLower();
string path = null;
if (saveLocally)
@@ -373,16 +375,14 @@ namespace MediaBrowser.Server.Implementations.Providers
if (string.IsNullOrEmpty(path) && !string.IsNullOrEmpty(item.MetaLocation))
{
path = Path.Combine(item.MetaLocation, filename + extension.ToLower());
path = Path.Combine(item.MetaLocation, filename + extension);
}
}
filename += "." + extension.ToLower();
// None of the save local conditions passed, so store it in our internal folders
if (string.IsNullOrEmpty(path))
{
path = _remoteImageCache.GetResourcePath(item.GetType().FullName + item.Id, filename);
path = _remoteImageCache.GetResourcePath(item.GetType().FullName + item.Id, filename + extension);
}
return path;