Fix new version number logic
This commit is contained in:
parent
1013717808
commit
59ce944478
|
@ -101,11 +101,11 @@ namespace MediaBrowser.Installer
|
||||||
prgProgress.Visibility = Visibility.Visible;
|
prgProgress.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
// Determine Package version
|
// Determine Package version
|
||||||
var version = await GetPackageVersion().ConfigureAwait(false);
|
var version = await GetPackageVersion();
|
||||||
lblStatus.Content = string.Format("Downloading {0} (version {1})...", FriendlyName, version.versionStr);
|
lblStatus.Content = string.Format("Downloading {0} (version {1})...", FriendlyName, version.versionStr);
|
||||||
|
|
||||||
// Download
|
// Download
|
||||||
var archive = await DownloadPackage(version).ConfigureAwait(false);
|
var archive = await DownloadPackage(version);
|
||||||
dlAnimation.StopAnimation();
|
dlAnimation.StopAnimation();
|
||||||
prgProgress.Visibility = btnCancel.Visibility = Visibility.Hidden;
|
prgProgress.Visibility = btnCancel.Visibility = Visibility.Hidden;
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ namespace MediaBrowser.Installer
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// get the package information for the server
|
// get the package information for the server
|
||||||
var json = await client.DownloadStringTaskAsync("http://www.mb3admin.com/admin/service/package/retrieveAll?name=" + PackageName).ConfigureAwait(false);
|
var json = await client.DownloadStringTaskAsync("http://www.mb3admin.com/admin/service/package/retrieveAll?name=" + PackageName);
|
||||||
var packages = JsonSerializer.DeserializeFromString<List<PackageInfo>>(json);
|
var packages = JsonSerializer.DeserializeFromString<List<PackageInfo>>(json);
|
||||||
|
|
||||||
var version = packages[0].versions.Where(v => v.classification == PackageClass).OrderByDescending(v => v.version).FirstOrDefault(v => v.version <= PackageVersion);
|
var version = packages[0].versions.Where(v => v.classification == PackageClass).OrderByDescending(v => v.version).FirstOrDefault(v => v.version <= PackageVersion);
|
||||||
|
@ -161,6 +161,7 @@ namespace MediaBrowser.Installer
|
||||||
SystemClose("Could not locate download package. Aborting.");
|
SystemClose("Could not locate download package. Aborting.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
return version;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -185,7 +186,7 @@ namespace MediaBrowser.Installer
|
||||||
|
|
||||||
// setup download progress and download the package
|
// setup download progress and download the package
|
||||||
client.DownloadProgressChanged += DownloadProgressChanged;
|
client.DownloadProgressChanged += DownloadProgressChanged;
|
||||||
await client.DownloadFileTaskAsync(version.sourceUrl, archiveFile).ConfigureAwait(false);
|
await client.DownloadFileTaskAsync(version.sourceUrl, archiveFile);
|
||||||
return archiveFile;
|
return archiveFile;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<PublisherName>Media Browser Team</PublisherName>
|
<PublisherName>Media Browser Team</PublisherName>
|
||||||
<SuiteName>Media Browser</SuiteName>
|
<SuiteName>Media Browser</SuiteName>
|
||||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||||
<ApplicationRevision>11</ApplicationRevision>
|
<ApplicationRevision>14</ApplicationRevision>
|
||||||
<ApplicationVersion>0.1.1.%2a</ApplicationVersion>
|
<ApplicationVersion>0.1.1.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user