mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
update live tv data transfer
This commit is contained in:
@@ -1521,7 +1521,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
var inputModifier = string.Empty;
|
||||
|
||||
var numInputFiles = state.PlayableStreamFileNames.Count > 0 ? state.PlayableStreamFileNames.Count : 1;
|
||||
var numInputFiles = state.PlayableStreamFileNames.Length > 0 ? state.PlayableStreamFileNames.Length : 1;
|
||||
var probeSizeArgument = GetProbeSizeArgument(numInputFiles);
|
||||
|
||||
string analyzeDurationArgument;
|
||||
@@ -1676,12 +1676,12 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
else
|
||||
{
|
||||
state.PlayableStreamFileNames = new List<string>();
|
||||
state.PlayableStreamFileNames = new string[]{};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
state.PlayableStreamFileNames = new List<string>();
|
||||
state.PlayableStreamFileNames = new string[] { };
|
||||
}
|
||||
|
||||
if (mediaSource.Timestamp.HasValue)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
public string MediaPath { get; set; }
|
||||
public bool IsInputVideo { get; set; }
|
||||
public IIsoMount IsoMount { get; set; }
|
||||
public List<string> PlayableStreamFileNames { get; set; }
|
||||
public string[] PlayableStreamFileNames { get; set; }
|
||||
public string OutputAudioCodec { get; set; }
|
||||
public int? OutputVideoBitrate { get; set; }
|
||||
public MediaStream SubtitleStream { get; set; }
|
||||
@@ -42,8 +42,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
public bool ReadInputAtNativeFramerate { get; set; }
|
||||
|
||||
private List<TranscodeReason> _transcodeReasons = null;
|
||||
public List<TranscodeReason> TranscodeReasons
|
||||
private TranscodeReason[] _transcodeReasons = null;
|
||||
public TranscodeReason[] TranscodeReasons
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -53,7 +53,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
.Split(',')
|
||||
.Where(i => !string.IsNullOrWhiteSpace(i))
|
||||
.Select(v => (TranscodeReason)Enum.Parse(typeof(TranscodeReason), v, true))
|
||||
.ToList();
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
return _transcodeReasons;
|
||||
@@ -164,7 +164,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
_logger = logger;
|
||||
TranscodingType = jobType;
|
||||
RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
PlayableStreamFileNames = new List<string>();
|
||||
PlayableStreamFileNames = new string[]{};
|
||||
SupportedAudioCodecs = new List<string>();
|
||||
SupportedVideoCodecs = new List<string>();
|
||||
SupportedSubtitleCodecs = new List<string>();
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
using MediaBrowser.Controller.IO;
|
||||
|
||||
namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
/// <summary>
|
||||
@@ -23,34 +20,34 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
/// <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, List<string> playableStreamFileNames)
|
||||
public static string[] GetInputArgument(IFileSystem fileSystem, string videoPath, MediaProtocol protocol, IIsoMount isoMount, string[] playableStreamFileNames)
|
||||
{
|
||||
if (playableStreamFileNames.Count > 0)
|
||||
if (playableStreamFileNames.Length > 0)
|
||||
{
|
||||
if (isoMount == null)
|
||||
{
|
||||
return GetPlayableStreamFiles(fileSystem, videoPath, playableStreamFileNames).ToArray();
|
||||
return GetPlayableStreamFiles(fileSystem, videoPath, playableStreamFileNames);
|
||||
}
|
||||
return GetPlayableStreamFiles(fileSystem, isoMount.MountedPath, playableStreamFileNames).ToArray();
|
||||
return GetPlayableStreamFiles(fileSystem, isoMount.MountedPath, playableStreamFileNames);
|
||||
}
|
||||
|
||||
return new[] {videoPath};
|
||||
}
|
||||
|
||||
private static List<string> GetPlayableStreamFiles(IFileSystem fileSystem, string rootPath, List<string> filenames)
|
||||
private static string[] GetPlayableStreamFiles(IFileSystem fileSystem, string rootPath, string[] filenames)
|
||||
{
|
||||
if (filenames.Count == 0)
|
||||
if (filenames.Length == 0)
|
||||
{
|
||||
return new List<string>();
|
||||
return new string[]{};
|
||||
}
|
||||
|
||||
var allFiles = fileSystem
|
||||
.GetFilePaths(rootPath, true)
|
||||
.ToList();
|
||||
.ToArray();
|
||||
|
||||
return filenames.Select(name => allFiles.FirstOrDefault(f => string.Equals(Path.GetFileName(f), name, StringComparison.OrdinalIgnoreCase)))
|
||||
.Where(f => !string.IsNullOrEmpty(f))
|
||||
.ToList();
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
public DlnaProfileType MediaType { get; set; }
|
||||
public IIsoMount MountedIso { get; set; }
|
||||
public VideoType VideoType { get; set; }
|
||||
public List<string> PlayableStreamFileNames { get; set; }
|
||||
public string[] PlayableStreamFileNames { get; set; }
|
||||
public int AnalyzeDurationMs { get; set; }
|
||||
|
||||
public MediaInfoRequest()
|
||||
{
|
||||
PlayableStreamFileNames = new List<string>();
|
||||
PlayableStreamFileNames = new string[] { };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user