mirror of
https://github.com/Jackett/Jackett
synced 2025-01-01 12:46:23 +00:00
parent
235f4ff753
commit
44f14138be
1 changed files with 9 additions and 2 deletions
|
@ -97,8 +97,8 @@ namespace Jackett.Common.Services
|
|||
logger.Info("Skipping checking for new releases as the debugger is attached.");
|
||||
return;
|
||||
}
|
||||
var currentVersion = $"v{EnvironmentUtil.JackettVersion}";
|
||||
if (currentVersion == "v0.0.0.0")
|
||||
var currentVersion = $"v{GetCurrentVersion()}";
|
||||
if (currentVersion == "v0.0.0")
|
||||
{
|
||||
logger.Info("Skipping checking for new releases because we are runing in IDE.");
|
||||
return;
|
||||
|
@ -187,6 +187,13 @@ namespace Jackett.Common.Services
|
|||
? Path.Combine(tempDirectory, "Jackett", "JackettUpdater")
|
||||
: Path.Combine(tempDirectory, "Jackett", "JackettUpdater.exe");
|
||||
|
||||
private string GetCurrentVersion()
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
|
||||
return fvi.ProductVersion;
|
||||
}
|
||||
|
||||
private WebRequest SetDownloadHeaders(WebRequest req)
|
||||
{
|
||||
req.Headers = new Dictionary<string, string>()
|
||||
|
|
Loading…
Reference in a new issue