pull/1488/head
Jamie.Rees 8 years ago
parent 166a83d13a
commit 74f3e0f143

@ -29,4 +29,10 @@
<ProjectReference Include="..\Ombi.TheMovieDbApi\Ombi.Api.TheMovieDb.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Diagnostics.Process">
<HintPath>..\..\..\..\..\.nuget\packages\system.diagnostics.process\4.3.0\ref\netstandard1.4\System.Diagnostics.Process.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
@ -22,8 +23,20 @@ namespace Ombi.Core.Update
Extract(path);
var location = System.Reflection.Assembly.GetEntryAssembly().Location;
var current = Path.GetDirectoryName(location);
// TODO Run the Update.exe and pass in the args
var start = new ProcessStartInfo
{
UseShellExecute = false,
CreateNoWindow = true,
FileName = Path.Combine(current, "Ombi.Updater.exe")
};
using (var proc = new Process { StartInfo = start })
{
proc.Start();
}
}
private void Extract(string path)
@ -89,7 +102,7 @@ namespace Ombi.Core.Update
return new UpdateOptions
{
Status = UpdateStatus.Available,
DownloadUrl = "https://ci.appveyor.com/api/buildjobs/tsghsfcaoqin2wbk/artifacts/Ombi_windows.zip",
DownloadUrl = "https://ci.appveyor.com/api/buildjobs/t500indclt3etd50/artifacts/Ombi_windows.zip",
UpdateDate = DateTime.Now,
Version = "3.0.0"
};

@ -93,7 +93,14 @@ namespace Ombi
c.CustomSchemaIds(x => x.FullName);
var basePath = PlatformServices.Default.Application.ApplicationBasePath;
var xmlPath = Path.Combine(basePath, "Swagger.xml");
c.IncludeXmlComments(xmlPath);
try
{
c.IncludeXmlComments(xmlPath);
}
catch (Exception e)
{
Console.WriteLine(e);
}
c.AddSecurityDefinition("Authentication",new ApiKeyScheme());
c.OperationFilter<SwaggerOperationFilter>();

Loading…
Cancel
Save