mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-07 21:51:13 -07:00
I think the auto updater is finished! #29
This commit is contained in:
parent
0601f04582
commit
aa2949cdd0
4 changed files with 56 additions and 6 deletions
|
@ -54,6 +54,7 @@ using PlexRequests.Store.Repository;
|
|||
using PlexRequests.UI.Helpers;
|
||||
using PlexRequests.UI.Models;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
using Nancy.Json;
|
||||
using Nancy.Security;
|
||||
|
@ -172,7 +173,9 @@ namespace PlexRequests.UI.Modules
|
|||
Get["/headphones"] = _ => Headphones();
|
||||
Post["/headphones"] = _ => SaveHeadphones();
|
||||
|
||||
Post ["/createapikey"] = x => CreateApiKey ();
|
||||
Post["/createapikey"] = x => CreateApiKey();
|
||||
|
||||
Post["/autoupdate"] = x => AutoUpdate();
|
||||
}
|
||||
|
||||
private Negotiator Authentication()
|
||||
|
@ -496,6 +499,16 @@ namespace PlexRequests.UI.Modules
|
|||
return View["Status", status];
|
||||
}
|
||||
|
||||
private Response AutoUpdate()
|
||||
{
|
||||
var url = Request.Form["url"];
|
||||
var startInfo = new ProcessStartInfo("PlexRequests.Updater.exe") { Arguments = url};
|
||||
Process.Start(startInfo);
|
||||
|
||||
Environment.Exit(0);
|
||||
return Nancy.Response.NoBody;
|
||||
}
|
||||
|
||||
private Negotiator PushbulletNotifications()
|
||||
{
|
||||
var settings = PushbulletService.GetSettings();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue