mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
MBTheater shutdown code in installer/uninstaller
This commit is contained in:
parent
cc574074b9
commit
d3e6dd5535
@ -131,6 +131,26 @@ namespace MediaBrowser.Installer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (PackageName == "MBTheater")
|
||||||
|
{
|
||||||
|
// Uninstalling MBT - shut it down if it is running
|
||||||
|
var processes = Process.GetProcessesByName("mediabrowser.ui");
|
||||||
|
if (processes.Length > 0)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
processes[0].CloseMainWindow();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Unable to shutdown Media Browser Theater. Please ensure it is not running before hitting OK.\n\n" + ex.Message, "Error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Download
|
// Download
|
||||||
var archive = await DownloadPackage(version);
|
var archive = await DownloadPackage(version);
|
||||||
|
@ -98,6 +98,22 @@ namespace MediaBrowser.Uninstaller.Execute
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Installing MBT - shut it down if it is running
|
||||||
|
var processes = Process.GetProcessesByName("mediabrowser.ui");
|
||||||
|
if (processes.Length > 0)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
processes[0].CloseMainWindow();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Unable to shutdown Media Browser Theater. Please ensure it is not running before hitting OK.\n\n" + ex.Message, "Error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// if the startmenu item is empty now - delete it too
|
// if the startmenu item is empty now - delete it too
|
||||||
if (Directory.GetFiles(startMenu).Length == 0)
|
if (Directory.GetFiles(startMenu).Length == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user