From be265cd87f2d65c99c6a1d7d128dc4391724939e Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Mon, 5 Feb 2024 23:41:43 +0800 Subject: Add EqualsAny for VideoCodecTag condition Signed-off-by: nyanmisaka --- .../MediaEncoding/EncodingJobInfo.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs') 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(); } + 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(); + } + public string GetRequestedLevel(string codec) { if (!string.IsNullOrEmpty(BaseRequest.Level)) -- cgit v1.2.3