mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 23:42:36 -07:00
This commit is contained in:
parent
706fc94eb3
commit
f7f66d4c11
22 changed files with 789 additions and 41 deletions
|
@ -1,4 +1,7 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Ombi.Common.Processes;
|
||||
|
||||
namespace Ombi.Updater
|
||||
{
|
||||
|
@ -6,16 +9,32 @@ namespace Ombi.Updater
|
|||
{
|
||||
public static void Main (string[] args)
|
||||
{
|
||||
Console.WriteLine ("Starting PlexRequests .Net updater");
|
||||
var s = new Updater();
|
||||
if (args.Length >= 2)
|
||||
{
|
||||
s.Start(args[0], args[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
s.Start(args[0], string.Empty);
|
||||
}
|
||||
var i = new InstallService();
|
||||
var context = ParseArgs(args);
|
||||
i.Start(context);
|
||||
//Console.WriteLine ("Starting Ombi updater");
|
||||
// var s = new Updater();
|
||||
// if (args.Length >= 2)
|
||||
// {
|
||||
// s.Start(args[0], args[1]);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// s.Start(args[0], string.Empty);
|
||||
// }
|
||||
}
|
||||
|
||||
private static UpdateStartupContext ParseArgs(string[] args)
|
||||
{
|
||||
|
||||
var proc = new ProcessProvider();
|
||||
var ombiProc = proc.FindProcessByName("Ombi").FirstOrDefault().Id;
|
||||
return new UpdateStartupContext
|
||||
{
|
||||
DownloadPath = args[0],
|
||||
ProcessId = ombiProc,
|
||||
StartupArgs = args.Length > 1 ? args[1] : string.Empty
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue