diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-25 16:58:31 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-25 16:58:31 -0400 |
| commit | b487794860d9d59d6b7f09594d248f58320a70b9 (patch) | |
| tree | 88c5c3e29cf488d766e71f832126d848423a44a8 /MediaBrowser.Server.Implementations/Providers/ImageSaver.cs | |
| parent | f3ecfc4e058d4222fb13112e40f717e7b0c6eb73 (diff) | |
fixed virtual episode image saving
Diffstat (limited to 'MediaBrowser.Server.Implementations/Providers/ImageSaver.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Providers/ImageSaver.cs | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/MediaBrowser.Server.Implementations/Providers/ImageSaver.cs b/MediaBrowser.Server.Implementations/Providers/ImageSaver.cs index a967c535e..3bdef9226 100644 --- a/MediaBrowser.Server.Implementations/Providers/ImageSaver.cs +++ b/MediaBrowser.Server.Implementations/Providers/ImageSaver.cs @@ -67,30 +67,20 @@ namespace MediaBrowser.Server.Implementations.Providers throw new ArgumentNullException("mimeType"); } - var saveLocally = _config.Configuration.SaveLocalMeta; + var saveLocally = _config.Configuration.SaveLocalMeta || item is IItemByName || item is User; - if (item is IItemByName) - { - saveLocally = true; - } - else if (item is User) - { - saveLocally = true; - } - else if (item is Audio || item.Parent == null || string.IsNullOrEmpty(item.MetaLocation)) + if (item is Audio || item.Parent == null) { saveLocally = false; } - if (type != ImageType.Primary) + if (type != ImageType.Primary && item is Episode) { - if (item is Episode) - { - saveLocally = false; - } + saveLocally = false; } - if (item.LocationType == LocationType.Remote || item.LocationType == LocationType.Virtual) + var locationType = item.LocationType; + if (locationType == LocationType.Remote || locationType == LocationType.Virtual) { saveLocally = false; } @@ -373,7 +363,7 @@ namespace MediaBrowser.Server.Implementations.Providers path = GetSavePathForItemInMixedFolder(item, type, filename, extension); } - if (string.IsNullOrEmpty(path) && !string.IsNullOrEmpty(item.MetaLocation)) + if (string.IsNullOrEmpty(path)) { path = Path.Combine(item.MetaLocation, filename + extension); } |
