mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
More Update #865
This commit is contained in:
parent
166a83d13a
commit
74f3e0f143
3 changed files with 29 additions and 3 deletions
|
@ -29,4 +29,10 @@
|
||||||
<ProjectReference Include="..\Ombi.TheMovieDbApi\Ombi.Api.TheMovieDb.csproj" />
|
<ProjectReference Include="..\Ombi.TheMovieDbApi\Ombi.Api.TheMovieDb.csproj" />
|
||||||
</ItemGroup>
|
</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>
|
</Project>
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -22,8 +23,20 @@ namespace Ombi.Core.Update
|
||||||
|
|
||||||
Extract(path);
|
Extract(path);
|
||||||
|
|
||||||
|
var location = System.Reflection.Assembly.GetEntryAssembly().Location;
|
||||||
|
var current = Path.GetDirectoryName(location);
|
||||||
// TODO Run the Update.exe and pass in the args
|
// 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)
|
private void Extract(string path)
|
||||||
|
@ -89,7 +102,7 @@ namespace Ombi.Core.Update
|
||||||
return new UpdateOptions
|
return new UpdateOptions
|
||||||
{
|
{
|
||||||
Status = UpdateStatus.Available,
|
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,
|
UpdateDate = DateTime.Now,
|
||||||
Version = "3.0.0"
|
Version = "3.0.0"
|
||||||
};
|
};
|
||||||
|
|
|
@ -93,7 +93,14 @@ namespace Ombi
|
||||||
c.CustomSchemaIds(x => x.FullName);
|
c.CustomSchemaIds(x => x.FullName);
|
||||||
var basePath = PlatformServices.Default.Application.ApplicationBasePath;
|
var basePath = PlatformServices.Default.Application.ApplicationBasePath;
|
||||||
var xmlPath = Path.Combine(basePath, "Swagger.xml");
|
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.AddSecurityDefinition("Authentication",new ApiKeyScheme());
|
||||||
c.OperationFilter<SwaggerOperationFilter>();
|
c.OperationFilter<SwaggerOperationFilter>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue