summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-04-29 16:29:33 +0000
committersr55 <[email protected]>2008-04-29 16:29:33 +0000
commitbbd3571c649d6e3735ad4cc493497119e93e5606 (patch)
tree99d67f0f244f2d00115e6f8f5fbab9e8502143d0 /win/C#/Functions
parent82085af4ca15f94743d2185e9ce514b8fb934a7b (diff)
WinGui:
- Update checker now reads either unstable or stable appcast based on the last digit of the build number. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1448 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/RssReader.cs27
1 files changed, 10 insertions, 17 deletions
diff --git a/win/C#/Functions/RssReader.cs b/win/C#/Functions/RssReader.cs
index c2da4aad6..ec461a402 100644
--- a/win/C#/Functions/RssReader.cs
+++ b/win/C#/Functions/RssReader.cs
@@ -28,7 +28,10 @@ namespace Handbrake.Functions
private void readRss()
{
- rssReader = new XmlTextReader(Properties.Settings.Default.appcast);
+ if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))
+ rssReader = new XmlTextReader(Properties.Settings.Default.appcast_unstable);
+ else
+ rssReader = new XmlTextReader(Properties.Settings.Default.appcast);
rssDoc = new XmlDocument();
rssDoc.Load(rssReader);
@@ -64,23 +67,13 @@ namespace Handbrake.Functions
hb_versionInfo = nodeItem["description"].InnerText;
// Get the version
- string input = nodeItem.InnerXml;
Match ver;
- if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))
- ver = Regex.Match(input, @"<cli-unstable>[0-9]* \""[0-9.]*\""");
- else
- ver = Regex.Match(input, @"<cli-stable>[0-9]* \""[0-9.]*\""");
- string[] hb_ver_find = ver.ToString().Split(' ');
- hb_version = hb_ver_find[1].Replace("\"", "");
-
- // Get the build number
- input = nodeItem.InnerXml;
- Match build;
- if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))
- build = Regex.Match(input, @"<cli-unstable>[0-9]*");
- else
- build = Regex.Match(input, @"<cli-stable>[0-9]*");
- hb_build = build.ToString().Replace("<cli-stable>", "").Replace("<cli-unstable>", "");
+ string input = nodeItem.InnerXml;
+ ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");
+ hb_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");
+
+ ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");
+ hb_build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");
// Get the update file
hb_file = nodeItem["windows"].InnerText;