diff options
author | sr55 <[email protected]> | 2009-08-25 16:16:00 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-08-25 16:16:00 +0000 |
commit | 31f7fbe8dd16aa524a8e3675060423127956a3e9 (patch) | |
tree | 9cb9701a6beba6a5c57a34b22d77d688c6926003 /win/C#/Functions | |
parent | 9a8b91075cc16230498db80e524a6f3899aac2cd (diff) |
WinGui:
- Fix several issues with Picture Settings panel related to aspect ration and resolution calculation.
- Fix issue where file extension could be mp4 when chapters is enabled. Problem in the autoname function.
- Fix a regex error in the appcast reader and make it more robust to errors.
- Clear up changelog
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2776 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r-- | win/C#/Functions/AppcastReader.cs | 26 | ||||
-rw-r--r-- | win/C#/Functions/Main.cs | 4 |
2 files changed, 18 insertions, 12 deletions
diff --git a/win/C#/Functions/AppcastReader.cs b/win/C#/Functions/AppcastReader.cs index 861bd0bae..7f1e90b88 100644 --- a/win/C#/Functions/AppcastReader.cs +++ b/win/C#/Functions/AppcastReader.cs @@ -18,18 +18,24 @@ namespace Handbrake.Functions /// </summary>
public void getInfo(string input)
{
- // Get the correct Appcast and set input.
- XmlNode nodeItem = readRss(new XmlTextReader(new StringReader(input)));
- string result = nodeItem.InnerXml;
+ try
+ {
+ // Get the correct Appcast and set input.
+ XmlNode nodeItem = readRss(new XmlTextReader(new StringReader(input)));
+ string result = nodeItem.InnerXml;
- // Regular Expressions
- Match ver = Regex.Match(result, @"sparkle:version=""([0-9]*)\""");
- Match verShort = Regex.Match(result, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");
+ // Regular Expressions
+ Match ver = Regex.Match(result, @"sparkle:version=""([0-9]*)\""");
+ Match verShort = Regex.Match(result, @"sparkle:shortVersionString=""(([svn]*)([0-9.\s]*))\""");
- build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");
- version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");
- downloadFile = nodeItem["windows"].InnerText;
- descriptionUrl = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);
+ build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");
+ version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");
+ downloadFile = nodeItem["windows"].InnerText;
+ descriptionUrl = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);
+ } catch( Exception)
+ {
+ // Ignore Error.
+ }
}
/// <summary>
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index db127b261..55b95c4a8 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -124,7 +124,7 @@ namespace Handbrake.Functions /// Function which generates the filename and path automatically based on
/// the Source Name, DVD title and DVD Chapters
/// </summary>
- public static string autoName(ComboBox drpDvdtitle, string chapter_start, string chatper_end, string source, string dest, int format)
+ public static string autoName(ComboBox drpDvdtitle, string chapter_start, string chatper_end, string source, string dest, int format, Boolean chapters)
{
string AutoNamePath = string.Empty;
if (drpDvdtitle.Text != "Automatic")
@@ -156,7 +156,7 @@ namespace Handbrake.Functions // Add the appropriate file extension
if (format == 0)
{
- if (Properties.Settings.Default.useM4v)
+ if (Properties.Settings.Default.useM4v || chapters)
destinationFilename += ".m4v";
else
destinationFilename += ".mp4";
|