diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-11-20 13:02:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-20 13:02:59 -0500 |
| commit | 8f78652398ad4e9e9af53a1bd065afe4b9d9260e (patch) | |
| tree | 32bc4144212d7f6ee3941c9c2471b56ab9c5d3e2 /Emby.Server.Implementations/MediaEncoder/EncodingManager.cs | |
| parent | 7d15b140cfe4f761e03f661f82cf946f327863f5 (diff) | |
| parent | 71ff88284be60fb39a7389e0c4990c94f2207ed4 (diff) | |
Merge pull request #3032 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/MediaEncoder/EncodingManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/MediaEncoder/EncodingManager.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs index 9a9e619a6..6e0e55bef 100644 --- a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs +++ b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs @@ -17,6 +17,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Providers; namespace Emby.Server.Implementations.MediaEncoder { @@ -89,7 +90,7 @@ namespace Emby.Server.Implementations.MediaEncoder /// </summary> private static readonly long FirstChapterTicks = TimeSpan.FromSeconds(15).Ticks; - public async Task<bool> RefreshChapterImages(Video video, List<ChapterInfo> chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken) + public async Task<bool> RefreshChapterImages(Video video, IDirectoryService directoryService, List<ChapterInfo> chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken) { if (!IsEligibleForChapterImageExtraction(video)) { @@ -101,7 +102,7 @@ namespace Emby.Server.Implementations.MediaEncoder var runtimeTicks = video.RunTimeTicks ?? 0; - var currentImages = GetSavedChapterImages(video); + var currentImages = GetSavedChapterImages(video, directoryService); foreach (var chapter in chapters) { @@ -194,13 +195,13 @@ namespace Emby.Server.Implementations.MediaEncoder return Path.Combine(GetChapterImagesPath(video), filename); } - private List<string> GetSavedChapterImages(Video video) + private List<string> GetSavedChapterImages(Video video, IDirectoryService directoryService) { var path = GetChapterImagesPath(video); try { - return _fileSystem.GetFilePaths(path) + return directoryService.GetFilePaths(path) .ToList(); } catch (IOException) |
