Fixed infiite download loop

This commit is contained in:
Serraniel 2017-10-12 21:28:02 +02:00
parent f617a36a6f
commit 2d9d8570b1
4 changed files with 9 additions and 7 deletions

View file

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.99.150.0")]
[assembly: AssemblyFileVersion("0.99.150.0")]
[assembly: AssemblyVersion("0.99.151.0")]
[assembly: AssemblyFileVersion("0.99.151.0")]

View file

@ -25,8 +25,8 @@ namespace Discord_Media_Loader
UseWaitCursor = true;
try
{
/*var releaseVersion = await VersionHelper.GetReleaseVersion();
if (releaseVersion > VersionHelper.CurrentVersion)
var releaseVersion = await VersionHelper.GetReleaseVersion();
if (releaseVersion > VersionHelper.AppVersion)
{
var tmpFile = Path.GetTempFileName();
var downloadManager = new FrmDownload(tmpFile, await VersionHelper.DownloadVersion(releaseVersion));
@ -52,7 +52,7 @@ namespace Discord_Media_Loader
}
File.Delete(tmpFile);
}*/
}
}
finally
{

View file

@ -5,6 +5,7 @@ using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using DML.Application.Classes;
using Octokit;
namespace Discord_Media_Loader.Helper
@ -12,6 +13,7 @@ namespace Discord_Media_Loader.Helper
internal class VersionHelper
{
internal static Version CurrentVersion => Assembly.GetExecutingAssembly().GetName().Version;
internal static Version AppVersion => typeof(Core).Assembly.GetName().Version;
internal static async Task<Version> GetReleaseVersion()
{

View file

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.99.150.0")]
[assembly: AssemblyFileVersion("0.99.150.0")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]