mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
This commit is contained in:
parent
706fc94eb3
commit
f7f66d4c11
22 changed files with 789 additions and 41 deletions
|
@ -35,6 +35,7 @@ using MarkdownSharp;
|
|||
using Nancy;
|
||||
using Nancy.ModelBinding;
|
||||
using Nancy.Responses.Negotiation;
|
||||
using Ombi.Common.Processes;
|
||||
using Ombi.Core;
|
||||
using Ombi.Core.SettingModels;
|
||||
using Ombi.Core.StatusChecker;
|
||||
|
@ -123,7 +124,7 @@ namespace Ombi.UI.Modules.Admin
|
|||
var url = Request.Form["url"];
|
||||
var args = (string)Request.Form["args"].ToString();
|
||||
var lowered = args.ToLower();
|
||||
var appPath = Path.Combine(Path.GetDirectoryName(Assembly.GetAssembly(typeof(SystemStatusModule)).Location ?? string.Empty) ?? string.Empty, "Ombi.Updater.exe");
|
||||
var appPath = Path.Combine(Path.GetDirectoryName(Assembly.GetAssembly(typeof(SystemStatusModule)).Location ?? string.Empty) ?? string.Empty, Path.Combine("UpdateService", "Ombi.Updater.exe"));
|
||||
|
||||
if (!string.IsNullOrEmpty(lowered))
|
||||
{
|
||||
|
@ -133,7 +134,7 @@ namespace Ombi.UI.Modules.Admin
|
|||
}
|
||||
}
|
||||
|
||||
var startArgs = string.IsNullOrEmpty(lowered) ? appPath : $"{lowered} Ombi.Updater.exe";
|
||||
var startArgs = string.IsNullOrEmpty(lowered) || lowered == "Nancy.DynamicDictionaryValue".ToLower() ? appPath : $"{lowered} Ombi.Updater.exe";
|
||||
|
||||
var startInfo = Type.GetType("Mono.Runtime") != null
|
||||
? new ProcessStartInfo(startArgs) { Arguments = $"{url} {lowered}", }
|
||||
|
@ -141,7 +142,7 @@ namespace Ombi.UI.Modules.Admin
|
|||
|
||||
Process.Start(startInfo);
|
||||
|
||||
Environment.Exit(0);
|
||||
//Environment.Exit(0);
|
||||
return Nancy.Response.NoBody;
|
||||
}
|
||||
|
||||
|
|
|
@ -941,6 +941,10 @@
|
|||
<Project>{8CB8D235-2674-442D-9C6A-35FCAEEB160D}</Project>
|
||||
<Name>Ombi.Api</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Ombi.Common\Ombi.Common.csproj">
|
||||
<Project>{BFD45569-90CF-47CA-B575-C7B0FF97F67B}</Project>
|
||||
<Name>Ombi.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Ombi.Core.Migration\Ombi.Core.Migration.csproj">
|
||||
<Project>{8406EE57-D533-47C0-9302-C6B5F8C31E55}</Project>
|
||||
<Name>Ombi.Core.Migration</Name>
|
||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using CommandLine;
|
||||
using Microsoft.Owin.Hosting;
|
||||
|
@ -41,6 +42,7 @@ using Ombi.Core.SettingModels;
|
|||
using Ombi.Helpers;
|
||||
using Ombi.Store;
|
||||
using Ombi.Store.Repository;
|
||||
using Ombi.UI.Modules.Admin;
|
||||
using Ombi.UI.Start;
|
||||
|
||||
namespace Ombi.UI
|
||||
|
@ -50,7 +52,6 @@ namespace Ombi.UI
|
|||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
var result = Parser.Default.ParseArguments<StartupOptions>(args);
|
||||
var baseUrl = result.MapResult(
|
||||
o => o.BaseUrl,
|
||||
|
|
|
@ -50,9 +50,9 @@
|
|||
{
|
||||
<label class="control-label"><a href="@Model.Status.UpdateUri" target="_blank"><i class="fa fa-check"></i></a></label>
|
||||
<br />
|
||||
@*<input id="args" class="form-control form-control-custom " placeholder="optional launch arguments e.g. /etc/mono /opt/PlexRequests.exe">*@
|
||||
<input id="args" class="form-control form-control-custom " placeholder="optional launch arguments e.g. /etc/mono /opt/PlexRequests.exe">
|
||||
<br/>
|
||||
@*<button id="autoUpdate" class="btn btn-success-outline">Automatic Update (beta) <i class="fa fa-download"></i></button>*@
|
||||
<button id="autoUpdate" class="btn btn-success-outline">Automatic Update (beta) <i class="fa fa-download"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue