diff options
author | sr55 <[email protected]> | 2014-01-21 20:27:57 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-01-21 20:27:57 +0000 |
commit | 1c5cdd2e5767b3b25df9da740034e1f05a43d271 (patch) | |
tree | d6230a366fdb4785faa69974efa3e3a6afb5b713 /win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs | |
parent | 675678a7157fac5c8ad6a69edd21fbf33d263c08 (diff) |
WinGui: Make the Preset Plist importer a bit more robust by checking versions and automatically falling back to a value for invalid key/value pairs from old versions.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5988 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs index 3ddb1ff51..25c3a1426 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs @@ -276,13 +276,13 @@ namespace HandBrake.ApplicationServices.Utilities if (parsed.FastDecode)
{
tune = tune == "none" ? "fastdecode" : tune + ",fastdecode";
- } - AddEncodeElement(xmlWriter, "x264Tune", "string", tune); - AddEncodeElement(xmlWriter, "x264UseAdvancedOptions", "integer", parsed.ShowAdvancedTab ? "1" : "0"); - AddEncodeElement(xmlWriter, "qsvPreset", "string", parsed.QsvPreset.ToString().ToLower()); - - int videoQualityType = 0; - if (parsed.VideoBitrate != null) videoQualityType = 1; + }
+ AddEncodeElement(xmlWriter, "x264Tune", "string", tune);
+ AddEncodeElement(xmlWriter, "x264UseAdvancedOptions", "integer", parsed.ShowAdvancedTab ? "1" : "0");
+ AddEncodeElement(xmlWriter, "qsvPreset", "string", parsed.QsvPreset.ToString().ToLower());
+
+ int videoQualityType = 0;
+ if (parsed.VideoBitrate != null) videoQualityType = 1;
else if (parsed.Quality != null) videoQualityType = 2;
AddEncodeElement(xmlWriter, "VideoQualityType", "integer", videoQualityType.ToString());
|