mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-20 07:45:26 +03:00
Reduce the amount of exceptions thrown
This commit is contained in:
@@ -6,11 +6,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
{
|
||||
public static class EncodingUtils
|
||||
{
|
||||
public static string GetInputArgument(List<string> inputFiles, MediaProtocol protocol)
|
||||
public static string GetInputArgument(IReadOnlyList<string> inputFiles, MediaProtocol protocol)
|
||||
{
|
||||
if (protocol != MediaProtocol.File)
|
||||
{
|
||||
var url = inputFiles.First();
|
||||
var url = inputFiles[0];
|
||||
|
||||
return string.Format("\"{0}\"", url);
|
||||
}
|
||||
@@ -29,7 +29,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
// If there's more than one we'll need to use the concat command
|
||||
if (inputFiles.Count > 1)
|
||||
{
|
||||
var files = string.Join("|", inputFiles.Select(NormalizePath).ToArray());
|
||||
var files = string.Join("|", inputFiles.Select(NormalizePath));
|
||||
|
||||
return string.Format("concat:\"{0}\"", files);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user