summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/QueryParser.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-11-26 19:32:53 +0000
committersr55 <[email protected]>2008-11-26 19:32:53 +0000
commite8b7af4abd15d0035f69ebd96cc592e171d2ae43 (patch)
tree0826c5d09461ee6eb6eb5fe3022a0bdd875d161b /win/C#/Functions/QueryParser.cs
parent80fa9daad46cf5281b71ed287868e535fa9fbdb9 (diff)
WinGui:
- The Queue Recovery, inport/export features now use an XML based file system rather than text file. - Queue now uses class based Queue Items for storing data rather than an arraylist. - Fixes an issue where the source and/or destination would not show up in the list of queue items. - Queue progress meter will now update correctly if a user adds more items to the queue after starting the queue. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1958 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/QueryParser.cs')
-rw-r--r--win/C#/Functions/QueryParser.cs46
1 files changed, 6 insertions, 40 deletions
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index 3e8b18ebe..b2d2ee661 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -19,20 +19,6 @@ namespace Handbrake.Functions
#region Varibles
#region Source
-
- private string q_source;
- /// <summary>
- /// Returns a String
- /// Full path of the source.
- /// </summary>
- public string Source
- {
- get
- {
- return this.q_source;
- }
- }
-
private int q_dvdTitle;
/// <summary>
/// Returns an Integer
@@ -74,20 +60,6 @@ namespace Handbrake.Functions
#endregion
#region Destination
-
- private string q_destination;
- /// <summary>
- /// Returns a String
- /// Full path of the destination.
- /// </summary>
- public string Destination
- {
- get
- {
- return this.q_destination;
- }
- }
-
private string q_format;
/// <summary>
/// Returns a String
@@ -811,16 +783,16 @@ namespace Handbrake.Functions
QueryParser thisQuery = new QueryParser();
#region Regular Expressions
+ // Useful Destination Finder
+ //Regex r1 = new Regex(@"(-i)(?:\s\"")([a-zA-Z0-9?';!^%&*()_\-:\\\s\.]+)(?:\"")");
+ //Match source = r1.Match(input.Replace('"', '\"'));
+
//Source
- Regex r1 = new Regex(@"(-i)(?:\s\"")([a-zA-Z0-9_\-:\\\s\.]+)(?:\"")");
- Match source = r1.Match(input.Replace('"', '\"'));
Match title = Regex.Match(input, @"-t ([0-9]*)");
Match chapters = Regex.Match(input, @"-c ([0-9-]*)");
Match format = Regex.Match(input, @"-f ([a-z0-9a-z0-9a-z0-9]*)");
//Destination
- Regex r2 = new Regex(@"(-o)(?:\s\"")([a-zA-Z0-9_\-:\\\s\.]+)(?:\"")");
- Match destination = r2.Match(input.Replace('"', '\"'));
Match videoEncoder = Regex.Match(input, @"-e ([a-zA-Z0-9]*)");
//Picture Settings Tab
@@ -896,12 +868,9 @@ namespace Handbrake.Functions
#region Set Varibles
try
{
-
#region Source Tab
-
- thisQuery.q_source = source.ToString().Replace("-i ", "").Replace("\"", "");
if (title.Success != false)
- thisQuery.q_dvdTitle = int.Parse(title.ToString().Replace("-t ", ""));
+ thisQuery.q_dvdTitle = int.Parse(title.ToString().Replace("-t ", ""));
if (chapters.Success != false)
{
@@ -923,11 +892,8 @@ namespace Handbrake.Functions
#endregion
#region Destination
- thisQuery.q_destination = destination.ToString().Replace("-o ", "").Replace("\"", "");
-
- string videoEncoderConvertion;
- videoEncoderConvertion = videoEncoder.ToString().Replace("-e ", "");
+ string videoEncoderConvertion = videoEncoder.ToString().Replace("-e ", "");
switch (videoEncoderConvertion)
{
case "ffmpeg":