|
|
@ -112,11 +112,11 @@ namespace MediaBrowser.Installer
|
|
|
|
|
|
|
|
|
|
|
|
// Determine Package version
|
|
|
|
// Determine Package version
|
|
|
|
var version = await GetPackageVersion();
|
|
|
|
var version = await GetPackageVersion();
|
|
|
|
lblStatus.Content = string.Format("Downloading {0} (version {1})...", FriendlyName, version.versionStr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Now try and shut down the server if that is what we are installing and it is running
|
|
|
|
// Now try and shut down the server if that is what we are installing and it is running
|
|
|
|
if (PackageName == "MBServer" && Process.GetProcessesByName("mediabrowser.serverapplication").Length != 0)
|
|
|
|
if (PackageName == "MBServer" && Process.GetProcessesByName("mediabrowser.serverapplication").Length != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
lblStatus.Content = "Shutting Down Media Browser Server...";
|
|
|
|
using (var client = new WebClient())
|
|
|
|
using (var client = new WebClient())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
@ -139,9 +139,10 @@ namespace MediaBrowser.Installer
|
|
|
|
var processes = Process.GetProcessesByName("mediabrowser.ui");
|
|
|
|
var processes = Process.GetProcessesByName("mediabrowser.ui");
|
|
|
|
if (processes.Length > 0)
|
|
|
|
if (processes.Length > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
lblStatus.Content = "Shutting Down Media Browser Theater...";
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
processes[0].CloseMainWindow();
|
|
|
|
processes[0].Kill();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -153,6 +154,7 @@ namespace MediaBrowser.Installer
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Download
|
|
|
|
// Download
|
|
|
|
|
|
|
|
lblStatus.Content = string.Format("Downloading {0} (version {1})...", FriendlyName, version.versionStr);
|
|
|
|
var archive = await DownloadPackage(version);
|
|
|
|
var archive = await DownloadPackage(version);
|
|
|
|
dlAnimation.StopAnimation();
|
|
|
|
dlAnimation.StopAnimation();
|
|
|
|
prgProgress.Visibility = btnCancel.Visibility = Visibility.Hidden;
|
|
|
|
prgProgress.Visibility = btnCancel.Visibility = Visibility.Hidden;
|
|
|
|