diff --git a/MediaBrowser.Providers/Folders/DefaultImageProvider.cs b/MediaBrowser.Providers/Folders/DefaultImageProvider.cs index 1f36c0976..a5a2e1e72 100644 --- a/MediaBrowser.Providers/Folders/DefaultImageProvider.cs +++ b/MediaBrowser.Providers/Folders/DefaultImageProvider.cs @@ -170,4 +170,4 @@ namespace MediaBrowser.Providers.Folders return GetSupportedImages(item).Any(i => !item.HasImage(i)); } } -} +} \ No newline at end of file diff --git a/MediaBrowser.Providers/Manager/ItemImageProvider.cs b/MediaBrowser.Providers/Manager/ItemImageProvider.cs index 19f575d0d..f99aa967f 100644 --- a/MediaBrowser.Providers/Manager/ItemImageProvider.cs +++ b/MediaBrowser.Providers/Manager/ItemImageProvider.cs @@ -359,12 +359,13 @@ namespace MediaBrowser.Providers.Manager private void ClearImages(IHasImages item, ImageType type) { var deleted = false; + var deletedImages = new List(); foreach (var image in item.GetImages(type).ToList()) { if (!image.IsLocalFile) { - // TODO: Need to get this image removed + deletedImages.Add(image); continue; } @@ -384,6 +385,11 @@ namespace MediaBrowser.Providers.Manager } } + foreach (var image in deletedImages) + { + item.RemoveImage(image); + } + if (deleted) { item.ValidateImages(new DirectoryService(_logger, _fileSystem)); diff --git a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs index f0c5cbbd3..a575daacb 100644 --- a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs +++ b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs @@ -15,6 +15,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using System.Threading; using System.Threading.Tasks; using CommonIO; @@ -130,6 +131,8 @@ namespace MediaBrowser.Providers.Subtitles try { + //var isText = MediaStream.IsTextFormat(response.Format); + using (var fs = _fileSystem.GetFileStream(savePath, FileMode.Create, FileAccess.Write, FileShare.Read, true)) { await stream.CopyToAsync(fs).ConfigureAwait(false);