diff options
Diffstat (limited to 'win/C#/Functions/QueryParser.cs')
-rw-r--r-- | win/C#/Functions/QueryParser.cs | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs index 174f92218..00ae96655 100644 --- a/win/C#/Functions/QueryParser.cs +++ b/win/C#/Functions/QueryParser.cs @@ -471,6 +471,18 @@ namespace Handbrake.Functions }
}
+ private string q_audioTrack2;
+ /// <summary>
+ /// Returns a string with the First selected Audio track
+ /// </summary>
+ public string AudioTrack2
+ {
+ get
+ {
+ return this.q_audioTrack2;
+ }
+ }
+
private string q_audioTrackMix;
/// <summary>
/// Returns a string with the First selected Audio track Mix
@@ -495,6 +507,18 @@ namespace Handbrake.Functions }
}
+ private Boolean q_forcedSubs;
+ /// <summary>
+ /// Returns a string with the selected subtitle track
+ /// </summary>
+ public Boolean ForcedSubtitles
+ {
+ get
+ {
+ return this.q_forcedSubs;
+ }
+ }
+
private string q_h264;
/// <summary>
/// Returns a string with the Advanced H264 query string
@@ -569,7 +593,9 @@ namespace Handbrake.Functions Match audioBitrate = Regex.Match(input, @"-B ([0-9]*)");
Match audioSampleRate = Regex.Match(input, @"-R ([0-9.]*)");
Match audioChannelsMix = Regex.Match(input, @"-6 ([0-9a-z0-9]*)"); // 1 -6 dpl2 // Broken
- Match audioChannel = Regex.Match(input, @"-a ([0-9]*)");
+ Match audioTrack1 = Regex.Match(input, @"-a ([0-9]*)");
+ Match audioTrack2 = Regex.Match(input, @"-a ([0-9]*),([0-9]*)");
+ Match forcedSubtitles = Regex.Match(input, @"-F");
//H264 Tab
Match x264 = Regex.Match(input, @"-x ([,a-zA-Z0-9=:-]*)");
@@ -781,11 +807,19 @@ namespace Handbrake.Functions if (audioSampleRate.Success != false)
thisQuery.q_audioSamplerate = audioSampleRate.ToString().Replace("-R ", "");
- if (audioChannel.Success != false)
- thisQuery.q_audioTrack1 = audioChannel.ToString().Replace("-a ", "");
+ if (audioTrack1.Success != false)
+ thisQuery.q_audioTrack1 = audioTrack1.ToString().Replace("-a ", "");
else
thisQuery.q_audioTrack1 = "Automatic";
+ if (audioTrack2.Success != false)
+ {
+ string[] audioChan = audioTrack2.ToString().Split(',');
+ thisQuery.q_audioTrack2 = audioChan[1];
+ }
+ else
+ thisQuery.q_audioTrack2 = "None";
+
thisQuery.q_audioTrackMix = "Automatic";
if (audioChannelsMix.Success != false)
{
@@ -817,6 +851,8 @@ namespace Handbrake.Functions else
thisQuery.q_subtitles = "None";
+ thisQuery.q_forcedSubs = forcedSubtitles.Success;
+
#endregion
//
|