Added some update APIs to check for updates and download and extract the update package.

Todo: apply updated, UI.
This commit is contained in:
kay.one 2011-10-20 22:04:26 -07:00
commit 8f9946eb63
31 changed files with 18597 additions and 95 deletions

View file

@ -11,14 +11,14 @@ namespace NzbDrone.Core.Providers.Core
{
public class ConfigFileProvider
{
private string _configFile = Path.Combine(CentralDispatch.AppPath, "App_Data", "Config.xml");
private string _configFile = Path.Combine(new EnviromentProvider().AppPath, "App_Data", "Config.xml");
public string ConfigFile
{
get { return _configFile; }
set { _configFile = value; }
}
public virtual int Port
{
get { return GetValueInt("Port", 8989); }
@ -60,7 +60,7 @@ namespace NzbDrone.Core.Providers.Core
}
var valueHolder = parentContainer.Descendants(key).ToList();
if (valueHolder.Count() == 1)
return valueHolder.First().Value;
@ -113,7 +113,7 @@ namespace NzbDrone.Core.Providers.Core
public virtual void CreateDefaultConfigFile()
{
//Create the config file here
Directory.CreateDirectory(Path.Combine(CentralDispatch.AppPath, "App_Data"));
Directory.CreateDirectory(Path.Combine(new EnviromentProvider().AppPath, "App_Data"));
if (!File.Exists(ConfigFile))
{