mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 06:23:03 +03:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user