diff --git a/CHANGELOG.md b/CHANGELOG.md index 90edac1b..00b59cad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next +## Version 9.2.14 (2025-06-16) +* Fix daily notification of new version. Should only notify once when new version is available + ## Version 9.2.13 (2025-05-23) * More fixes for placeshifter on windows (added consolewin registry optional logging to match client) diff --git a/java/sage/Version.java b/java/sage/Version.java index f4adb027..e8347766 100644 --- a/java/sage/Version.java +++ b/java/sage/Version.java @@ -23,7 +23,7 @@ public class Version { public static final byte MAJOR_VERSION = 9; public static final byte MINOR_VERSION = 2; - public static final byte MICRO_VERSION = 13; + public static final byte MICRO_VERSION = 14; public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + MICRO_VERSION + "." + SageConstants.BUILD_VERSION; diff --git a/java/sage/Wizard.java b/java/sage/Wizard.java index 270f53e1..4c3eb328 100644 --- a/java/sage/Wizard.java +++ b/java/sage/Wizard.java @@ -423,6 +423,7 @@ private Index getIndex(byte tableCode, byte indexCode) static final String CLEAR_WATCHED = "clearwatched"; private static final String NOSHOW_ID = "noshow_id"; private static final String LAST_MAINTENANCE = "last_maintenance"; + private static final String LAST_VER_NOTIFY = "last_ver_notify"; private static final String NODATA_MAX_LEN = "nodata_max_len"; private static final String NODATA_DUR_FOR_MAXRULE = "nodata_dur_for_maxrule"; @@ -7254,9 +7255,19 @@ public boolean checkForUpdate(){ if(compareVersion(latestVersion, currentVersion)==1){ if (Sage.DBG) System.out.println("checkForUpdate: currentVersion:" + currentVersion + " latestVersion:" + latestVersion + " New version is available"); - //add notification of new version - sage.msg.MsgManager.postMessage(sage.msg.SystemMessage.createVersionUpdateMsg(latestVersion, url.toString())); - return true; + //check if we have already notified of this new version + + String lastNotifyVer = Sage.get(prefsRoot + LAST_VER_NOTIFY, ""); + if (lastNotifyVer.length() == 0 || !latestVersion.equals(lastNotifyVer)){ + //add notification of new version + sage.msg.MsgManager.postMessage(sage.msg.SystemMessage.createVersionUpdateMsg(latestVersion, url.toString())); + Sage.put(prefsRoot + LAST_VER_NOTIFY, latestVersion); + return true; + }else{ + if (Sage.DBG) System.out.println("checkForUpdate: currentVersion:" + currentVersion + " latestVersion:" + latestVersion + " Notification already created. Skipping"); + return false; + } + } if (Sage.DBG) System.out.println("checkForUpdate: currentVersion:" + currentVersion + " latestVersion:" + latestVersion + " No new version is available"); return false;