mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 12:44:19 +01:00
More code cleanups
This commit is contained in:
parent
670a53258e
commit
f1e668bad8
@@ -30,7 +30,7 @@ namespace MediaBrowser.ServerApplication
|
||||
SingleInstance<App>.Cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region ISingleInstanceApp Members
|
||||
public bool SignalExternalCommandLineArgs(IList<string> args)
|
||||
{
|
||||
@@ -42,9 +42,30 @@ namespace MediaBrowser.ServerApplication
|
||||
|
||||
public static void OpenDashboard()
|
||||
{
|
||||
using (Process process = Process.Start("http://localhost:" + Kernel.Instance.Configuration.HttpServerPortNumber + "/mediabrowser/dashboard/index.html"))
|
||||
OpenUrl("http://localhost:" + Kernel.Instance.Configuration.HttpServerPortNumber +
|
||||
"/mediabrowser/dashboard/index.html");
|
||||
}
|
||||
|
||||
public static void OpenUrl(string url)
|
||||
{
|
||||
var process = new Process
|
||||
{
|
||||
}
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = url
|
||||
},
|
||||
|
||||
EnableRaisingEvents = true
|
||||
};
|
||||
|
||||
process.Exited += ProcessExited;
|
||||
|
||||
process.Start();
|
||||
}
|
||||
|
||||
static void ProcessExited(object sender, EventArgs e)
|
||||
{
|
||||
(sender as Process).Dispose();
|
||||
}
|
||||
|
||||
protected override IKernel InstantiateKernel()
|
||||
|
||||
@@ -23,9 +23,7 @@ namespace MediaBrowser.ServerApplication
|
||||
|
||||
private void cmVisitCT_click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
using (Process process = Process.Start("http://community.mediabrowser.tv/"))
|
||||
{
|
||||
}
|
||||
App.OpenUrl("http://community.mediabrowser.tv/");
|
||||
}
|
||||
|
||||
private void cmExit_click(object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user