Remove PlayableStreamFileNames as unused

Since ffmpeg can play and transcode ISO files and BDMV folders directly,
there's no use of that property.
This commit is contained in:
Stanislav Ionascu
2020-10-01 22:20:28 +02:00
parent 3ad6232973
commit cd4641dca0
14 changed files with 44 additions and 205 deletions

View File

@@ -13,32 +13,5 @@ namespace MediaBrowser.Controller.MediaEncoding
/// </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="playableStreamFileNames">The playable stream file names.</param>
/// <returns>string[].</returns>
public static string[] GetInputArgument(IFileSystem fileSystem, string videoPath, IReadOnlyCollection<string> playableStreamFileNames)
{
if (playableStreamFileNames.Count > 0)
{
return GetPlayableStreamFiles(fileSystem, videoPath, playableStreamFileNames);
}
return new[] { videoPath };
}
private static string[] GetPlayableStreamFiles(IFileSystem fileSystem, string rootPath, IEnumerable<string> filenames)
{
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();
}
}
}