Skip to content

Commit

Permalink
Fix: new stable/testing release notifications (#181)
Browse files Browse the repository at this point in the history
- added automatic checking for new testing releases;
- fixed notifications about the new stable/testing release;
- fixed "Uncaught ReferenceError: installedRev" error;
  • Loading branch information
dnzbk committed Feb 21, 2024
1 parent 0cc6023 commit 1c03b71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion nzbget.conf
Expand Up @@ -439,10 +439,11 @@ AuthorizedIP=
# NOTE: For more details visit https://nzbget.com/documentation/certificate-verification/.
CertCheck=no

# Automatically check for new releases (none, stable).
# Automatically check for new releases (none, stable, testing).
#
# None - do not show notifcations;
# Stable - show notifications about new stable releases;
# Testing - show notifications about new testing releases;
UpdateCheck=stable

# User name for daemon-mode, POSIX only.
Expand Down
9 changes: 3 additions & 6 deletions webui/config.js
Expand Up @@ -2980,7 +2980,6 @@ var UpdateDialog = (new function($)


var installedVer = installedVersion;
var installedTesting = installedVersion.indexOf('testing') > -1;

var canInstallStable = UpdateInfo['stable-version'] &&
(installedVer < UpdateInfo['stable-version']);
Expand Down Expand Up @@ -3009,11 +3008,9 @@ var UpdateDialog = (new function($)
Util.show('#UpdateDialog_CheckFailed', hasUpdateSource && !hasUpdateInfo);
Util.show('#UpdateDialog_DownloadRow,#UpdateDialog_DownloadAvail', canDownload && !canUpdate);
$('#UpdateDialog_AvailRow').toggleClass('hide', !hasUpdateInfo);

if (!foreground &&
(((canInstallStable || canDownloadStable) && notificationAllowed('stable')) ||
(Options.option('UpdateCheck') === 'testing' && installedRev > 0 &&
(canInstallTesting || canDownloadTesting) && notificationAllowed('testing'))))
var canUpdateStable = Options.option('UpdateCheck') === 'stable' && (canInstallStable || canDownloadStable) && notificationAllowed('stable');
var canUpdateTesting = Options.option('UpdateCheck') === 'testing' && (canInstallTesting || canDownloadTesting) && notificationAllowed('testing');
if (canUpdateStable || canUpdateTesting)
{
$UpdateDialog.modal({backdrop: 'static'});
}
Expand Down

0 comments on commit 1c03b71

Please sign in to comment.