OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 17 Jun 2008 12:53:40 +0000 (12:53 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 17 Jun 2008 12:53:40 +0000 (12:53 +0000)
- Issue in the query parser where "-2" would trigger a widget if found anywhere in the CLI string.
  This could appear in the source or destination filename and trigger it when it is not supposed to be on.
  added a space before the - in the regex which will hopefully be sufficient to fix the issue.

git-svn-id: svn://localhost/HandBrake/trunk@1516 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Functions/QueryParser.cs

index ae5d39c..a4b2f5a 100644 (file)
@@ -796,10 +796,10 @@ namespace Handbrake.Functions
             Match denoise = Regex.Match(input, @"--denoise=\""([a-zA-Z]*)\""");\r
             Match deblock = Regex.Match(input, @"--deblock");\r
             Match detelecine = Regex.Match(input, @"--detelecine");\r
-            Match anamorphic = Regex.Match(input, @"-p ");\r
-            Match chapterMarkers = Regex.Match(input, @"-m");\r
+            Match anamorphic = Regex.Match(input, @" -p ");\r
+            Match chapterMarkers = Regex.Match(input, @" -m");\r
             Match crop = Regex.Match(input, @"--crop ([0-9]):([0-9]):([0-9]):([0-9])");\r
-            Match vfr = Regex.Match(input, @"-V");\r
+            Match vfr = Regex.Match(input, @" -V");\r
             Match lanamorphic = Regex.Match(input, @"-P");\r
 \r
             //Video Settings Tab\r
@@ -807,12 +807,12 @@ namespace Handbrake.Functions
             Match videoBitrate = Regex.Match(input, @"-b ([0-9]*)");\r
             Match videoQuality = Regex.Match(input, @"-q ([0-9.]*)");\r
             Match videoFilesize = Regex.Match(input, @"-S ([0-9.]*)");\r
-            Match twoPass = Regex.Match(input, @"-2");\r
-            Match turboFirstPass = Regex.Match(input, @"-T");\r
-            Match grayscale = Regex.Match(input, @"-g");\r
-            Match largerMp4 = Regex.Match(input, @"-4");\r
-            Match ipodAtom = Regex.Match(input, @"-I");\r
-            Match optimizeMP4 = Regex.Match(input, @"-O");\r
+            Match twoPass = Regex.Match(input, @" -2 ");\r
+            Match turboFirstPass = Regex.Match(input, @" -T");\r
+            Match grayscale = Regex.Match(input, @" -g");\r
+            Match largerMp4 = Regex.Match(input, @" -4");\r
+            Match ipodAtom = Regex.Match(input, @" -I");\r
+            Match optimizeMP4 = Regex.Match(input, @" -O");\r
 \r
             //Audio Settings Tab\r
             Match audioTrack1 = Regex.Match(input, @"-a ([0-9]*)");\r
@@ -846,14 +846,14 @@ namespace Handbrake.Functions
             Match drc4 = Regex.Match(input, @"-D ([0-9.]*),([0-9.]*),([0-9.]*),([0-9.]*)");\r
 \r
             Match subtitles = Regex.Match(input, @"-s ([0-9a-zA-Z]*)");\r
-            Match subScan = Regex.Match(input, @"-U");\r
-            Match forcedSubtitles = Regex.Match(input, @"-F");\r
+            Match subScan = Regex.Match(input, @" -U");\r
+            Match forcedSubtitles = Regex.Match(input, @" -F");\r
 \r
             //H264 Tab\r
             Match x264 = Regex.Match(input, @"-x ([.,/a-zA-Z0-9=:-]*)");\r
 \r
             //Program Options\r
-            Match verbose = Regex.Match(input, @"-v");\r
+            Match verbose = Regex.Match(input, @" -v");\r
             #endregion\r
 \r
             #region Set Varibles\r