summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-01-29 22:25:36 +0000
committersr55 <[email protected]>2011-01-29 22:25:36 +0000
commitd7a70498c42ef73540589c36963b1a4ff57bf238 (patch)
treea7ad00ed5439196d18c86987946d2fa7867e588f /win
parentc9c50d62e5ea118f68b9079b514b58bd5016e2c5 (diff)
WinGui:
- Moved the plist and query parsing code into new Utility classes in the app services. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3775 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/Controls/AudioPanel.cs3
-rw-r--r--win/C#/Functions/PresetLoader.cs4
-rw-r--r--win/C#/HandBrake.ApplicationServices/Functions/Converters.cs50
-rw-r--r--win/C#/HandBrake.ApplicationServices/Functions/PlistHelper.cs127
-rw-r--r--win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj5
-rw-r--r--win/C#/HandBrake.ApplicationServices/Init.cs9
-rw-r--r--win/C#/HandBrake.ApplicationServices/Utilities/PlistUtility.cs (renamed from win/C#/Presets/PlistPresetHandler.cs)24
-rw-r--r--win/C#/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs (renamed from win/C#/Functions/QueryParser.cs)67
-rw-r--r--win/C#/HandBrake.ApplicationServices/Utilities/UtilityService.cs (renamed from win/C#/HandBrake.ApplicationServices/Services/UtilityService.cs)0
-rw-r--r--win/C#/HandBrakeCS.csproj2
-rw-r--r--win/C#/Program.cs2
-rw-r--r--win/C#/frmMain.cs9
-rw-r--r--win/C#/frmOptions.cs1
-rw-r--r--win/C#/frmQueue.cs5
14 files changed, 226 insertions, 82 deletions
diff --git a/win/C#/Controls/AudioPanel.cs b/win/C#/Controls/AudioPanel.cs
index cb2433548..ba9c1794e 100644
--- a/win/C#/Controls/AudioPanel.cs
+++ b/win/C#/Controls/AudioPanel.cs
@@ -14,6 +14,7 @@ namespace Handbrake.Controls
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
+ using HandBrake.ApplicationServices.Utilities;
using Presets;
@@ -151,7 +152,7 @@ namespace Handbrake.Controls
// Add any tracks the preset has, if there is a preset and no audio tracks in the list currently
if (audioList.Rows.Count == 0 && preset != null)
{
- QueryParser parsed = QueryParser.Parse(preset.Query);
+ QueryParserUtility parsed = QueryParserUtility.Parse(preset.Query);
foreach (AudioTrack audioTrack in parsed.AudioInformation)
{
DataGridViewRow newTrack = new DataGridViewRow();
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 790d51163..f15389eae 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -8,6 +8,8 @@ namespace Handbrake.Functions
using System.Drawing;
using System.Windows.Forms;
+ using HandBrake.ApplicationServices.Utilities;
+
/// <summary>
/// Load a preset into the main Window
/// </summary>
@@ -26,7 +28,7 @@ namespace Handbrake.Functions
/// <param name="name">
/// Name of the preset
/// </param>
- public static void LoadPreset(frmMain mainWindow, QueryParser presetQuery, string name)
+ public static void LoadPreset(frmMain mainWindow, QueryParserUtility presetQuery, string name)
{
#region Source
diff --git a/win/C#/HandBrake.ApplicationServices/Functions/Converters.cs b/win/C#/HandBrake.ApplicationServices/Functions/Converters.cs
index 84df3dac3..e1a4069f3 100644
--- a/win/C#/HandBrake.ApplicationServices/Functions/Converters.cs
+++ b/win/C#/HandBrake.ApplicationServices/Functions/Converters.cs
@@ -34,5 +34,55 @@ namespace HandBrake.ApplicationServices.Functions
return converted;
}
+
+ /// <summary>
+ /// Get the GUI equiv to a CLI mixdown
+ /// </summary>
+ /// <param name="mixdown">The Audio Mixdown</param>
+ /// <returns>The GUI representation of the mixdown</returns>
+ public static string GetMixDown(string mixdown)
+ {
+ switch (mixdown.Trim())
+ {
+ case "mono":
+ return "Mono";
+ case "stereo":
+ return "Stereo";
+ case "dpl1":
+ return "Dolby Surround";
+ case "dpl2":
+ return "Dolby Pro Logic II";
+ case "6ch":
+ return "6 Channel Discrete";
+ default:
+ return "Automatic";
+ }
+ }
+
+ /// <summary>
+ /// Get the GUI equiv to a CLI audio encoder
+ /// </summary>
+ /// <param name="audioEnc">The Audio Encoder</param>
+ /// <returns>The GUI representation of that audio encoder</returns>
+ public static string GetAudioEncoder(string audioEnc)
+ {
+ switch (audioEnc)
+ {
+ case "faac":
+ return "AAC (faac)";
+ case "lame":
+ return "MP3 (lame)";
+ case "vorbis":
+ return "Vorbis (vorbis)";
+ case "ac3":
+ return "AC3 (ffmpeg)";
+ case "copy:ac3":
+ return "AC3 Passthru";
+ case "copy:dts":
+ return "DTS Passthru";
+ default:
+ return "AAC (faac)";
+ }
+ }
}
}
diff --git a/win/C#/HandBrake.ApplicationServices/Functions/PlistHelper.cs b/win/C#/HandBrake.ApplicationServices/Functions/PlistHelper.cs
new file mode 100644
index 000000000..fab40a27c
--- /dev/null
+++ b/win/C#/HandBrake.ApplicationServices/Functions/PlistHelper.cs
@@ -0,0 +1,127 @@
+/* PlistHelper.cs $
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+
+namespace HandBrake.ApplicationServices.Functions
+{
+ using System;
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Xml;
+
+ /// <summary>
+ /// A Plist Helper
+ /// </summary>
+ public class PlistHelper
+ {
+ /// <summary>
+ /// Get the Audio Track XML Nodes from a plist preset file
+ /// </summary>
+ /// <param name="filename">
+ /// A Plist preset file
+ /// </param>
+ /// <returns>
+ /// A List of XmlNodes which contain audio tracks
+ /// </returns>
+ public static List<XmlNode> GetAudioTracks(string filename)
+ {
+ // Data Store
+ List<XmlNode> audioTracks = new List<XmlNode>();
+
+ // Load the file and get the Root note, or return if none found
+ XmlNode root = LoadFile(filename);
+ if (root == null)
+ {
+ return null;
+ }
+
+ // Get the Audio Tracks
+ XmlNode audioListDict = root.ChildNodes[2].ChildNodes[0].FirstChild.ChildNodes[1];
+ for (int i = 0; i < audioListDict.ChildNodes.Count; i++)
+ {
+ XmlNode audioChannel = audioListDict.ChildNodes[i]; // <dict>
+ audioTracks.Add(audioChannel);
+ }
+
+ return audioTracks;
+ }
+
+ /// <summary>
+ /// Get the settings portion of a presets file
+ /// </summary>
+ /// <param name="filename">
+ /// A Plist preset file
+ /// </param>
+ /// <returns>
+ /// A Dictionary of plist key against an XML node containing the setting.
+ /// </returns>
+ public static Dictionary<string, XmlNode> GetPresetSettings(string filename)
+ {
+ // Data Store
+ Dictionary<string, XmlNode> settings = new Dictionary<string, XmlNode>();
+
+ // Load the file and get the Root note, or return if none found
+ XmlNode root = LoadFile(filename);
+ if (root == null)
+ {
+ return null;
+ }
+
+ // Get the Preset Settings, starting from the 3rd node (skipping the audio notes we've just prcessed)
+ XmlNode presetSettings = root.ChildNodes[2].ChildNodes[0].FirstChild;
+ for (int i = 2; i < presetSettings.ChildNodes.Count; i += 2)
+ {
+ string key = presetSettings.ChildNodes[i].InnerText;
+ XmlNode node = presetSettings.ChildNodes[i + 1];
+ settings.Add(key, node);
+ }
+
+ return settings;
+ }
+
+ /// <summary>
+ /// Load a Plist Preset file and return it as an XML document
+ /// </summary>
+ /// <param name="filename">
+ /// A Plist preset file
+ /// </param>
+ /// <returns>
+ /// An XML document
+ /// </returns>
+ private static XmlNode LoadFile(string filename)
+ {
+ try
+ {
+ if (!File.Exists(filename))
+ {
+ return null;
+ }
+
+ StreamReader sr = File.OpenText(filename);
+ string fromfile = string.Empty;
+ int fileChar;
+ while ((fileChar = sr.Read()) != -1)
+ {
+ fromfile += Convert.ToChar(fileChar);
+ }
+
+ XmlDocument doc = new XmlDocument();
+ doc.LoadXml(fromfile);
+
+ XmlNode root = doc;
+ if (!root.HasChildNodes)
+ {
+ return null;
+ }
+
+ return root;
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+ }
+}
diff --git a/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
index 764eb0ce2..c338ed021 100644
--- a/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
+++ b/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
@@ -91,6 +91,7 @@
<Compile Include="Functions\Converters.cs" />
<Compile Include="Functions\EnumHelper.cs" />
<Compile Include="Functions\GrowlCommunicator.cs" />
+ <Compile Include="Functions\PlistHelper.cs" />
<Compile Include="Functions\System.cs" />
<Compile Include="Functions\Win32.cs" />
<Compile Include="Functions\Win7.cs" />
@@ -137,7 +138,9 @@
<Compile Include="Services\QueueManager.cs" />
<Compile Include="Services\QueueProcessor.cs" />
<Compile Include="Services\ScanService.cs" />
- <Compile Include="Services\UtilityService.cs" />
+ <Compile Include="Utilities\PlistUtility.cs" />
+ <Compile Include="Utilities\QueryParserUtility.cs" />
+ <Compile Include="Utilities\UtilityService.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
diff --git a/win/C#/HandBrake.ApplicationServices/Init.cs b/win/C#/HandBrake.ApplicationServices/Init.cs
index 999b4555e..e51683ab8 100644
--- a/win/C#/HandBrake.ApplicationServices/Init.cs
+++ b/win/C#/HandBrake.ApplicationServices/Init.cs
@@ -17,7 +17,6 @@ namespace HandBrake.ApplicationServices
* I really dislike this, Need to replace this sooner rather than later.
**/
-
/// <summary>
/// Setup the Settings used by the applicaiton with this library
/// </summary>
@@ -57,13 +56,14 @@ namespace HandBrake.ApplicationServices
/// <param name="preventSleep">
/// Prevent the system from sleeping
/// </param>
- public static void SetupSettings(string versionString, string version, int instanceId, string completionOption, bool disableDvdNav,
+ public static void SetupSettings(string versionString, string version, int build, int instanceId, string completionOption, bool disableDvdNav,
bool growlEncode, bool growlQueue, string processPriority, string saveLogPath, bool saveLogToSpecifiedPath,
bool saveLogWithVideo, bool showCliForInGuiEncodeStatus, bool preventSleep)
{
InstanceId = instanceId;
HandBrakeGuiVersionString = versionString;
Version = version;
+ Build = build;
CompletionOption = completionOption;
DisableDvdNav = disableDvdNav;
GrowlEncode = growlEncode;
@@ -103,6 +103,11 @@ namespace HandBrake.ApplicationServices
public static string Version;
/// <summary>
+ /// Handbrakes Build number
+ /// </summary>
+ public static int Build;
+
+ /// <summary>
/// What to do when the encode completes.
/// </summary>
public static string CompletionOption;
diff --git a/win/C#/Presets/PlistPresetHandler.cs b/win/C#/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
index 8be15633c..c3dacb6d4 100644
--- a/win/C#/Presets/PlistPresetHandler.cs
+++ b/win/C#/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
@@ -3,7 +3,7 @@
Homepage: <http://handbrake.fr/>.
It may be used under the terms of the GNU General Public License. */
-namespace Handbrake.Presets
+namespace HandBrake.ApplicationServices.Utilities
{
using System;
using System.Collections;
@@ -11,7 +11,6 @@ namespace Handbrake.Presets
using System.Text;
using System.Windows.Forms;
using System.Xml;
- using Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
@@ -21,16 +20,22 @@ namespace Handbrake.Presets
/// </summary>
public class PlistPresetHandler
{
+ /**
+ * TODO:
+ * - Update with the new vfr,pfr,cfr keys
+ * - Clean up this code, it's pretty nasty right now.
+ **/
+
#region Import
- public static QueryParser Import(string filename)
+ public static QueryParserUtility Import(string filename)
{
XmlNode root = loadFile(filename);
if (root == null) return null;
// We'll query a query parser object and use it's public var structures to store all the data.
// This will allow the preset loader logic to be used instead of writing custom logic just for this file.
- QueryParser queryParsed = new QueryParser();
+ QueryParserUtility queryParsed = new QueryParserUtility();
string qualityMode = string.Empty;
#region Get a List of Audio Track Objects
@@ -338,7 +343,7 @@ namespace Handbrake.Presets
/// </param>
public static void Export(string path, Preset preset)
{
- QueryParser parsed = QueryParser.Parse(preset.Query);
+ QueryParserUtility parsed = QueryParserUtility.Parse(preset.Query);
XmlTextWriter xmlWriter = new XmlTextWriter(path, Encoding.UTF8) { Formatting = Formatting.Indented };
// Header
@@ -374,7 +379,7 @@ namespace Handbrake.Presets
/// <param name="preset">
/// The preset.
/// </param>
- private static void WritePreset(XmlTextWriter xmlWriter, QueryParser parsed, Preset preset)
+ private static void WritePreset(XmlTextWriter xmlWriter, QueryParserUtility parsed, Preset preset)
{
xmlWriter.WriteStartElement("dict");
AudioListArrayDict(xmlWriter, parsed);
@@ -395,7 +400,7 @@ namespace Handbrake.Presets
/// <param name="preset">
/// The preset.
/// </param>
- private static void AddEncodeSettings(XmlTextWriter xmlWriter, QueryParser parsed, Preset preset)
+ private static void AddEncodeSettings(XmlTextWriter xmlWriter, QueryParserUtility parsed, Preset preset)
{
AddEncodeElement(xmlWriter, "ChapterMarkers", "integer", parsed.ChapterMarkers ? "1" : "0");
AddEncodeElement(xmlWriter, "Default", "integer", "0");
@@ -488,6 +493,7 @@ namespace Handbrake.Presets
detelecine = 1;
break;
}
+
AddEncodeElement(xmlWriter, "PictureDetelecine", "integer", detelecine.ToString());
AddEncodeElement(xmlWriter, "PictureDetelecineCustom", "string", detelecine == 1 ? parsed.DeTelecine : string.Empty);
@@ -502,7 +508,7 @@ namespace Handbrake.Presets
AddEncodeElement(xmlWriter, "PictureWidth", "integer", parsed.Width.ToString());
// Preset Information
- AddEncodeElement(xmlWriter, "PresetBuildNumber", "string", Properties.Settings.Default.hb_build.ToString());
+ AddEncodeElement(xmlWriter, "PresetBuildNumber", "string", Init.Build.ToString());
AddEncodeElement(xmlWriter, "PresetDescription", "string", "No Description");
AddEncodeElement(xmlWriter, "PresetName", "string", preset.Name);
AddEncodeElement(xmlWriter, "Type", "integer", "1"); // 1 is user preset, 0 is built in
@@ -592,7 +598,7 @@ namespace Handbrake.Presets
/// <param name="parsed">
/// The parsed.
/// </param>
- private static void AudioListArrayDict(XmlTextWriter xmlWriter, QueryParser parsed)
+ private static void AudioListArrayDict(XmlTextWriter xmlWriter, QueryParserUtility parsed)
{
xmlWriter.WriteStartElement("key");
xmlWriter.WriteString("AudioList");
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
index 076444660..9f5f93d24 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
@@ -3,21 +3,20 @@
Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
-namespace Handbrake.Functions
+namespace HandBrake.ApplicationServices.Utilities
{
using System;
using System.Collections;
using System.Globalization;
using System.Text.RegularExpressions;
+ using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model.Encoding;
- using Model;
-
/// <summary>
/// Parse a CLI Query
/// </summary>
- public class QueryParser
+ public class QueryParserUtility
{
/// <summary>
/// The Culture
@@ -300,9 +299,9 @@ namespace Handbrake.Functions
/// </summary>
/// <param name="input">A ClI Query</param>
/// <returns>A Parsed Query</returns>
- public static QueryParser Parse(string input)
+ public static QueryParserUtility Parse(string input)
{
- var thisQuery = new QueryParser();
+ var thisQuery = new QueryParserUtility();
#region Regular Expressions
@@ -593,11 +592,11 @@ namespace Handbrake.Functions
if (trackMixes != null)
if (trackMixes.Length >= (x + 1)) // Audio Mix
- track.MixDown = GetMixDown(trackMixes[x].Trim());
+ track.MixDown = Converters.GetMixDown(trackMixes[x].Trim());
if (trackEncoders != null)
if (trackEncoders.Length >= (x + 1)) // Audio Mix
- track.Encoder = GetAudioEncoder(trackEncoders[x].Trim());
+ track.Encoder = Converters.GetAudioEncoder(trackEncoders[x].Trim());
if (trackBitrates != null)
if (trackBitrates.Length >= (x + 1)) // Audio Encoder
@@ -643,62 +642,12 @@ namespace Handbrake.Functions
}
catch (Exception exc)
{
- Main.ShowExceptiowWindow("An error has occured in the Query Parser.", exc.ToString());
+ throw new Exception("An error has occured in the QueryParser Utility.", exc);
}
#endregion
return thisQuery;
}
-
- /// <summary>
- /// Get the GUI equiv to a CLI mixdown
- /// </summary>
- /// <param name="mixdown">The Audio Mixdown</param>
- /// <returns>The GUI representation of the mixdown</returns>
- private static string GetMixDown(string mixdown)
- {
- switch (mixdown.Trim())
- {
- case "mono":
- return "Mono";
- case "stereo":
- return "Stereo";
- case "dpl1":
- return "Dolby Surround";
- case "dpl2":
- return "Dolby Pro Logic II";
- case "6ch":
- return "6 Channel Discrete";
- default:
- return "Automatic";
- }
- }
-
- /// <summary>
- /// Get the GUI equiv to a CLI audio encoder
- /// </summary>
- /// <param name="audioEnc">The Audio Encoder</param>
- /// <returns>The GUI representation of that audio encoder</returns>
- private static string GetAudioEncoder(string audioEnc)
- {
- switch (audioEnc)
- {
- case "faac":
- return "AAC (faac)";
- case "lame":
- return "MP3 (lame)";
- case "vorbis":
- return "Vorbis (vorbis)";
- case "ac3":
- return "AC3 (ffmpeg)";
- case "copy:ac3":
- return "AC3 Passthru";
- case "copy:dts":
- return "DTS Passthru";
- default:
- return "AAC (faac)";
- }
- }
}
} \ No newline at end of file
diff --git a/win/C#/HandBrake.ApplicationServices/Services/UtilityService.cs b/win/C#/HandBrake.ApplicationServices/Utilities/UtilityService.cs
index b705cb8e1..b705cb8e1 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/UtilityService.cs
+++ b/win/C#/HandBrake.ApplicationServices/Utilities/UtilityService.cs
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj
index 2f0ebe0ca..2edb86514 100644
--- a/win/C#/HandBrakeCS.csproj
+++ b/win/C#/HandBrakeCS.csproj
@@ -256,9 +256,7 @@
<DependentUpon>frmActivityWindow.cs</DependentUpon>
</Compile>
<Compile Include="Model\SourceType.cs" />
- <Compile Include="Presets\PlistPresetHandler.cs" />
<Compile Include="Presets\PresetsHandler.cs" />
- <Compile Include="Functions\QueryParser.cs" />
<Compile Include="Program.cs" />
<Compile Include="ToolWindows\BatchAdd.cs">
<SubType>Form</SubType>
diff --git a/win/C#/Program.cs b/win/C#/Program.cs
index 34bf5098b..6b2ab110c 100644
--- a/win/C#/Program.cs
+++ b/win/C#/Program.cs
@@ -108,7 +108,7 @@ namespace Handbrake
private static void InitializeApplicationServices()
{
string versionId = String.Format("Windows GUI {1} {0}", Settings.Default.hb_build, Settings.Default.hb_version);
- Init.SetupSettings(versionId, Settings.Default.hb_version, InstanceId, Settings.Default.CompletionOption, Settings.Default.noDvdNav,
+ Init.SetupSettings(versionId, Settings.Default.hb_version, Settings.Default.hb_build, InstanceId, Settings.Default.CompletionOption, Settings.Default.noDvdNav,
Settings.Default.growlEncode, Settings.Default.growlQueue,
Settings.Default.processPriority, Settings.Default.saveLogPath, Settings.Default.saveLogToSpecifiedPath,
Settings.Default.saveLogWithVideo, Settings.Default.showCliForInGuiEncodeStatus, Settings.Default.preventSleep);
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index f1462e83d..95e7ce746 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -17,6 +17,7 @@ namespace Handbrake
using Functions;
using HandBrake.ApplicationServices.EventArgs;
+ using HandBrake.ApplicationServices.Utilities;
using HandBrake.Framework.Model;
using HandBrake.Framework.Services;
using HandBrake.Framework.Views;
@@ -171,7 +172,7 @@ namespace Handbrake
{
x264Panel.Reset2Defaults();
- QueryParser presetQuery = QueryParser.Parse(query);
+ QueryParserUtility presetQuery = QueryParserUtility.Parse(query);
PresetLoader.LoadPreset(this, presetQuery, Settings.Default.defaultPreset);
x264Panel.StandardizeOptString();
@@ -899,7 +900,7 @@ namespace Handbrake
x264Panel.Reset2Defaults();
// Send the query from the file to the Query Parser class
- QueryParser presetQuery = QueryParser.Parse(query);
+ QueryParserUtility presetQuery = QueryParserUtility.Parse(query);
// Now load the preset
PresetLoader.LoadPreset(this, presetQuery, presetName);
@@ -938,7 +939,7 @@ namespace Handbrake
{
if (openPreset.ShowDialog() == DialogResult.OK)
{
- QueryParser parsed = PlistPresetHandler.Import(openPreset.FileName);
+ QueryParserUtility parsed = PlistPresetHandler.Import(openPreset.FileName);
if (presetHandler.CheckIfUserPresetExists(parsed.PresetName + " (Imported)"))
{
DialogResult result =
@@ -2237,7 +2238,7 @@ namespace Handbrake
if (queueEdit.Query != null)
{
// Send the query from the file to the Query Parser class
- QueryParser presetQuery = QueryParser.Parse(queueEdit.Query);
+ QueryParserUtility presetQuery = QueryParserUtility.Parse(queueEdit.Query);
// Now load the preset
PresetLoader.LoadPreset(this, presetQuery, "Load Back From Queue");
diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs
index 4ad7b87f9..7bee96b11 100644
--- a/win/C#/frmOptions.cs
+++ b/win/C#/frmOptions.cs
@@ -504,6 +504,7 @@ namespace Handbrake
Init.SetupSettings(
versionId,
Settings.Default.hb_version,
+ Settings.Default.hb_build,
Program.InstanceId,
Settings.Default.CompletionOption,
Settings.Default.noDvdNav,
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 88dc40c16..1ccda8139 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -18,6 +18,7 @@ namespace Handbrake
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrake.ApplicationServices.Utilities;
using Model;
@@ -323,7 +324,7 @@ namespace Handbrake
foreach (QueueTask queueItem in theQueue)
{
string qItem = queueItem.Query;
- QueryParser parsed = QueryParser.Parse(qItem);
+ QueryParserUtility parsed = QueryParserUtility.Parse(qItem);
// Get the DVD Title
string title = parsed.Title == 0 ? "Auto" : parsed.Title.ToString();
@@ -387,7 +388,7 @@ namespace Handbrake
BeginInvoke(new UpdateHandler(SetCurrentEncodeInformation));
}
- QueryParser parsed = QueryParser.Parse(queue.QueueManager.LastProcessedJob.Query);
+ QueryParserUtility parsed = QueryParserUtility.Parse(queue.QueueManager.LastProcessedJob.Query);
// Get title and chapters
string title = parsed.Title == 0 ? "Auto" : parsed.Title.ToString();