diff options
author | sr55 <[email protected]> | 2009-07-04 14:24:59 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-07-04 14:24:59 +0000 |
commit | bdf19259ac2d6ac94abf0fad38ce6c98e3e58460 (patch) | |
tree | 3b92fa3d9ef24eeb3e71a45574b1c7f96d720558 /win/C#/Functions/AppcastReader.cs | |
parent | f3ea70992ab591a46754f68f5b7b02ca9d0529cc (diff) |
WinGui:
- Update checker code cleaned up and multi-threaded. (Thanks to darkassassin ) Made some minor changes to this code to fit it in. http://forum.handbrake.fr/viewtopic.php?f=4&t=11353
- Queue window no longer takes focus on each new addition to the queue. ( Quite annoying otherwise )
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2661 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/AppcastReader.cs')
-rw-r--r-- | win/C#/Functions/AppcastReader.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/win/C#/Functions/AppcastReader.cs b/win/C#/Functions/AppcastReader.cs index 944258597..861bd0bae 100644 --- a/win/C#/Functions/AppcastReader.cs +++ b/win/C#/Functions/AppcastReader.cs @@ -7,6 +7,7 @@ using System;
using System.Xml;
using System.Text.RegularExpressions;
+using System.IO;
namespace Handbrake.Functions
{
@@ -15,15 +16,15 @@ namespace Handbrake.Functions /// <summary>
/// Get the build information from the required appcasts. Run before accessing the public vars.
/// </summary>
- public void getInfo()
+ public void getInfo(string input)
{
// Get the correct Appcast and set input.
- XmlNode nodeItem = Properties.Settings.Default.hb_build.ToString().EndsWith("1") ? readRss(new XmlTextReader(Properties.Settings.Default.appcast_unstable)) : readRss(new XmlTextReader(Properties.Settings.Default.appcast));
- string input = nodeItem.InnerXml;
+ XmlNode nodeItem = readRss(new XmlTextReader(new StringReader(input)));
+ string result = nodeItem.InnerXml;
// Regular Expressions
- Match ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");
- Match verShort = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");
+ Match ver = Regex.Match(result, @"sparkle:version=""([0-9]*)\""");
+ Match verShort = Regex.Match(result, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");
build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");
version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");
|