aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2024-02-07 16:24:22 +0100
committerGitHub <noreply@github.com>2024-02-07 16:24:22 +0100
commit7e5c5eaff8e54aaa3f1f847e1b3c0031973763fe (patch)
tree3d87622f1e814098e2ed67129791f5e5f28616ca /MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
parent7ceeecd2cbeb00daccd1ae967058336004c38552 (diff)
parentbe265cd87f2d65c99c6a1d7d128dc4391724939e (diff)
Merge pull request #10965 from nyanmisaka/videocodectag-equals-any
Add EqualsAny for VideoCodecTag condition
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs')
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
index 17813559a..f2a0b906d 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
@@ -619,6 +619,26 @@ namespace MediaBrowser.Controller.MediaEncoding
return Array.Empty<string>();
}
+ public string[] GetRequestedCodecTags(string codec)
+ {
+ if (!string.IsNullOrEmpty(BaseRequest.CodecTag))
+ {
+ return BaseRequest.CodecTag.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
+ }
+
+ if (!string.IsNullOrEmpty(codec))
+ {
+ var codectag = BaseRequest.GetOption(codec, "codectag");
+
+ if (!string.IsNullOrEmpty(codectag))
+ {
+ return codectag.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
+ }
+ }
+
+ return Array.Empty<string>();
+ }
+
public string GetRequestedLevel(string codec)
{
if (!string.IsNullOrEmpty(BaseRequest.Level))