summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/AppcastReader.cs26
-rw-r--r--win/C#/Functions/Main.cs4
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";