diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs b/MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs deleted file mode 100644 index 70e4db84f..000000000 --- a/MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs +++ /dev/null @@ -1,53 +0,0 @@ -using MediaBrowser.Model.IO; -using MediaBrowser.Model.MediaInfo; -using System; -using System.IO; -using System.Linq; - -namespace MediaBrowser.Controller.MediaEncoding -{ - /// <summary> - /// Class MediaEncoderHelpers - /// </summary> - public static class MediaEncoderHelpers - { - /// <summary> - /// Gets the input argument. - /// </summary> - /// <param name="fileSystem">The file system.</param> - /// <param name="videoPath">The video path.</param> - /// <param name="protocol">The protocol.</param> - /// <param name="isoMount">The iso mount.</param> - /// <param name="playableStreamFileNames">The playable stream file names.</param> - /// <returns>System.String[][].</returns> - public static string[] GetInputArgument(IFileSystem fileSystem, string videoPath, MediaProtocol protocol, IIsoMount isoMount, string[] playableStreamFileNames) - { - if (playableStreamFileNames.Length > 0) - { - if (isoMount == null) - { - return GetPlayableStreamFiles(fileSystem, videoPath, playableStreamFileNames); - } - return GetPlayableStreamFiles(fileSystem, isoMount.MountedPath, playableStreamFileNames); - } - - return new[] {videoPath}; - } - - private static string[] GetPlayableStreamFiles(IFileSystem fileSystem, string rootPath, string[] filenames) - { - if (filenames.Length == 0) - { - return new string[]{}; - } - - var allFiles = fileSystem - .GetFilePaths(rootPath, true) - .ToArray(); - - return filenames.Select(name => allFiles.FirstOrDefault(f => string.Equals(Path.GetFileName(f), name, StringComparison.OrdinalIgnoreCase))) - .Where(f => !string.IsNullOrEmpty(f)) - .ToArray(); - } - } -} |
