|
@@ -4,7 +4,6 @@
|
|
|
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
-using System.ComponentModel;
|
|
|
using System.Globalization;
|
|
|
using System.Linq;
|
|
|
using Jellyfin.Data.Enums;
|
|
@@ -22,6 +21,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
// For now, a common base class until the API and MediaEncoding classes are unified
|
|
|
public class EncodingJobInfo
|
|
|
{
|
|
|
+ private static readonly char[] _separators = ['|', ','];
|
|
|
+
|
|
|
public int? OutputAudioBitrate;
|
|
|
public int? OutputAudioChannels;
|
|
|
|
|
@@ -586,7 +587,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
{
|
|
|
if (!string.IsNullOrEmpty(BaseRequest.Profile))
|
|
|
{
|
|
|
- return BaseRequest.Profile.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ return BaseRequest.Profile.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(codec))
|
|
@@ -595,7 +596,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
|
if (!string.IsNullOrEmpty(profile))
|
|
|
{
|
|
|
- return profile.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ return profile.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -606,7 +607,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
{
|
|
|
if (!string.IsNullOrEmpty(BaseRequest.VideoRangeType))
|
|
|
{
|
|
|
- return BaseRequest.VideoRangeType.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ return BaseRequest.VideoRangeType.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(codec))
|
|
@@ -615,7 +616,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
|
if (!string.IsNullOrEmpty(rangetype))
|
|
|
{
|
|
|
- return rangetype.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ return rangetype.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -626,7 +627,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
{
|
|
|
if (!string.IsNullOrEmpty(BaseRequest.CodecTag))
|
|
|
{
|
|
|
- return BaseRequest.CodecTag.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ return BaseRequest.CodecTag.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(codec))
|
|
@@ -635,7 +636,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
|
if (!string.IsNullOrEmpty(codectag))
|
|
|
{
|
|
|
- return codectag.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ return codectag.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
|
|
|
}
|
|
|
}
|
|
|
|