From af06f9bfd77a23cda6fcd462d8abbd995740fe37 Mon Sep 17 00:00:00 2001 From: Egor Berdnikov Date: Fri, 30 Dec 2016 20:06:58 +0100 Subject: [PATCH] Fixed #130: Google cast icon is not visible. Fixed Google cast icon is not visible on newer Chrome versions. Also fixed cast is not working because local ip address lookup is not performing. Signed-off-by: Egor Berdnikov --- .../player/service/SettingsService.java | 5 +++ .../src/main/webapp/WEB-INF/jsp/playQueue.jsp | 10 ++++- .../main/webapp/WEB-INF/jsp/playQueueCast.jsp | 2 - .../src/main/webapp/script/cast_sender-v1.js | 43 ------------------- 4 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 libresonic-main/src/main/webapp/script/cast_sender-v1.js diff --git a/libresonic-main/src/main/java/org/libresonic/player/service/SettingsService.java b/libresonic-main/src/main/java/org/libresonic/player/service/SettingsService.java index 25c8e534..2f253ae2 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/service/SettingsService.java +++ b/libresonic-main/src/main/java/org/libresonic/player/service/SettingsService.java @@ -217,6 +217,10 @@ public class SettingsService { private List cachedMusicFolders; private final ConcurrentMap> cachedMusicFoldersPerUser = new ConcurrentHashMap>(); + private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); + + private static final long LOCAL_IP_LOOKUP_DELAY_SECONDS = 60; + private String localIpAddress; private void removeObseleteProperties() { @@ -1285,6 +1289,7 @@ public class SettingsService { localIpAddress = Util.getLocalIpAddress(); } }; + executor.scheduleWithFixedDelay(task,0, LOCAL_IP_LOOKUP_DELAY_SECONDS, TimeUnit.SECONDS); } public void setInternetRadioDao(InternetRadioDao internetRadioDao) { diff --git a/libresonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp b/libresonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp index aa48c89d..db402fae 100644 --- a/libresonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp +++ b/libresonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp @@ -11,7 +11,6 @@ - <%@ include file="playQueueCast.jsp" %> ">