mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
!wip small changes #865
This commit is contained in:
parent
1bec8f54b0
commit
f6e0c25127
2 changed files with 3 additions and 16 deletions
|
@ -1,10 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Ombi.Updater
|
namespace Ombi.Updater
|
||||||
{
|
{
|
||||||
|
@ -156,19 +153,9 @@ namespace Ombi.Updater
|
||||||
return process.MainModule.FileName;
|
return process.MainModule.FileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<System.Diagnostics.Process> GetProcessesByName(string name)
|
private List<Process> GetProcessesByName(string name)
|
||||||
{
|
{
|
||||||
//TODO: move this to an OS specific class
|
var processes = Process.GetProcessesByName(name).ToList();
|
||||||
|
|
||||||
var monoProcesses = Process.GetProcessesByName("mono")
|
|
||||||
.Union(Process.GetProcessesByName("mono-sgen"))
|
|
||||||
.Where(process =>
|
|
||||||
process.Modules.Cast<ProcessModule>()
|
|
||||||
.Any(module =>
|
|
||||||
module.ModuleName.ToLower() == name.ToLower() + ".exe"));
|
|
||||||
|
|
||||||
var processes = Process.GetProcessesByName(name)
|
|
||||||
.Union(monoProcesses).ToList();
|
|
||||||
|
|
||||||
Console.WriteLine("Found {0} processes with the name: {1}", processes.Count, name);
|
Console.WriteLine("Found {0} processes with the name: {1}", processes.Count, name);
|
||||||
|
|
||||||
|
@ -188,7 +175,6 @@ namespace Ombi.Updater
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class ProcessInfo
|
public class ProcessInfo
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
|
@ -69,6 +69,7 @@
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Folder Include="ClientApp\app\settings\update\" />
|
||||||
<Folder Include="Styles\" />
|
<Folder Include="Styles\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue