diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b59cad..3aa57d56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next +## Version 9.2.15 (2025-09-16) +* Fix for lockouts with SD EPG including better handling when run as service and using clients +* Ensure SD is sent 14 character program IDs + ## Version 9.2.14 (2025-06-16) * Fix daily notification of new version. Should only notify once when new version is available diff --git a/java/sage/MetaImage.java b/java/sage/MetaImage.java index 336dd6ac..9fa2d090 100644 --- a/java/sage/MetaImage.java +++ b/java/sage/MetaImage.java @@ -3231,7 +3231,9 @@ private boolean loadCacheFile() if (Sage.DBG) System.out.println("MetaImage.loadCacheFile: Found SD image url. src = '" + src + "'"); //skip the image loading if the bypass properties are set - if(Sage.getBoolean("sdepg_core/bypassCelebrityImages", false) && Sage.getBoolean("sdepg_core/bypassProgramImages", false)){ + //2025-09-18 to ensure the server property is used even on a client SageProperties.java was updated to transfer these properties from the server + // - as we don't know the image is Celebrity vs Program then skip loading for either setting to be safe + if(Sage.getBoolean("sdepg_core/bypassCelebrityImages", false) || Sage.getBoolean("sdepg_core/bypassProgramImages", false)){ if (Sage.DBG) System.out.println("MetaImage.loadCacheFile: skipping image load as both bypass properties are set. src = '" + src + "'"); break; } diff --git a/java/sage/SageProperties.java b/java/sage/SageProperties.java index 1b08ef29..1c09b6de 100644 --- a/java/sage/SageProperties.java +++ b/java/sage/SageProperties.java @@ -26,11 +26,13 @@ public class SageProperties "epg/lineup_overrides", "epg/lineup_physical_overrides", "epg/physical_channel_lineups", "epg_data_sources", "videoframe/enable_pc", "videoframe/pc_code", "videoframe/pc_restrict", "mmc/video_format_code", "security/profile"/*and profiles*/, "security/default_profile", - "videoframe/force_live_playback_on_currently_airing_programs" }; + "videoframe/force_live_playback_on_currently_airing_programs", + "sdepg_core/bypassProgramImages", "sdepg_core/bypassCelebrityImages"}; public static final String[] CLIENT_DONT_SAVE_PROPERTY_PREFIXES = { "epg/channel_lineups", "epg/service_levels", "epg/lineup_overrides", "epg/lineup_physical_overrides", "epg/physical_channel_lineups", "epg_data_sources", "mmc/encoders", "videoframe/enable_pc", "videoframe/pc_code", "videoframe/pc_restrict", - "security/profile"/*and profiles*/, "security/default_profile", "videoframe/force_live_playback_on_currently_airing_programs" }; + "security/profile"/*and profiles*/, "security/default_profile", "videoframe/force_live_playback_on_currently_airing_programs", + "sdepg_core/bypassProgramImages", "sdepg_core/bypassCelebrityImages"}; public static final String[] EMBEDDED_SYNCED_PROPERTIES = { "AudioOutput", "VideoSupportedModes", "VideoOutputResolution", "VideoConnector", "videoframe/display_aspect_ratio", "time_zone", "ui/ui_overscan_correction_perct_width", "ui/ui_overscan_correction_perct_height", "ui/ui_overscan_correction_offset_y", "ui/ui_overscan_correction_offset_x", diff --git a/java/sage/Version.java b/java/sage/Version.java index e8347766..a280df44 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 = 14; + public static final byte MICRO_VERSION = 15; public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + MICRO_VERSION + "." + SageConstants.BUILD_VERSION; diff --git a/java/sage/epg/sd/SDSession.java b/java/sage/epg/sd/SDSession.java index ad134bf9..4fdcc5af 100644 --- a/java/sage/epg/sd/SDSession.java +++ b/java/sage/epg/sd/SDSession.java @@ -58,6 +58,8 @@ import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Collection; +import java.util.logging.Level; +import java.util.logging.Logger; public abstract class SDSession { @@ -213,12 +215,13 @@ public String getUsername() } /** - * Returns the provided token. + * Returns the current valid token. * - * @return The current token. + * @return The current valid token. */ - public synchronized String getToken() + public synchronized String getToken() throws IOException, SDException { + authenticate(); return token; } @@ -1101,6 +1104,9 @@ public SDProgramImages[] getProgramImages(String[] programs) throws IOException, JsonArray submit = new JsonArray(); for (String program : programs) { + //08-12-2025 jusjoken - convert program to 14 chars needed by SD + program = SDUtils.fromSageTVtoProgram(program); + //08-12-2025 jusjoken - the below should no longer be required - remove after testing //03-01-2025 jusjoken: added validation for program ids //first check if its already formated correctly if(SDUtils.isValidShortProgramID(program)){ @@ -1261,7 +1267,7 @@ public SDInProgressSport getInProgressSport(String programId) throws IOException if (programId.length() == 12) programId = SDUtils.fromSageTVtoProgram(programId); - // A token is not required to perform this lookup. + // A token is now required to perform this lookup. return getAuthJson(new URL(GET_IN_PROGRESS_SPORT + programId), SDInProgressSport.class); } } \ No newline at end of file diff --git a/java/sage/epg/sd/SDUtils.java b/java/sage/epg/sd/SDUtils.java index 82fda5a1..4c34865d 100644 --- a/java/sage/epg/sd/SDUtils.java +++ b/java/sage/epg/sd/SDUtils.java @@ -463,6 +463,7 @@ public static String fromSageTVtoProgram(String program) program = program + "0000"; return program; } + if (Sage.DBG && program.length()!=14) System.out.println("SDUtils.fromSageTVtoProgram: After conversion program is NOT 14 characters that SD requires. program = '" + program + "'"); return program; }