mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-13 16:47:46 +00:00
Reduce the amount of exceptions thrown
This commit is contained in:
parent
10a0d6bdba
commit
37ea50a572
13 changed files with 632 additions and 82 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue