aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2025-03-27 16:13:07 +0100
committerShadowghost <Ghost_of_Stone@web.de>2025-03-28 08:21:37 +0100
commit3df7d7a809d14e3ab89001d4c98203e20cad9082 (patch)
treedd8793c1487aa7f32eae7419a7b969f2fbb6931c /MediaBrowser.Controller
parent1fcc79316dc236e0b070c3d695477d6e87f4c229 (diff)
Add validation for level input
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index ed80de635..17fb42fcc 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -39,6 +39,12 @@ namespace MediaBrowser.Controller.MediaEncoding
/// </summary>
public const string ContainerValidationRegex = @"^[a-zA-Z0-9\-\._,|]{0,40}$";
+ /// <summary>
+ /// The level validation regex.
+ /// This regular expression matches strings representing a double.
+ /// </summary>
+ public const string LevelValidationRegex = @"-?\d+(?:\.\d+)?";
+
private const string _defaultMjpegEncoder = "mjpeg";
private const string QsvAlias = "qs";