From 9b1525715e54966f1a609418a67af4fcf4b594a8 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Thu, 1 Jan 2015 14:22:42 -0600 Subject: [PATCH] * fix a bug in broadcasting and also fix bad log refernce --- .../jam_ruby/resque/scheduled/icecast_source_check.rb | 4 ++-- web/app/assets/javascripts/sessionList.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ruby/lib/jam_ruby/resque/scheduled/icecast_source_check.rb b/ruby/lib/jam_ruby/resque/scheduled/icecast_source_check.rb index 1519ed6f3..8accb3c43 100644 --- a/ruby/lib/jam_ruby/resque/scheduled/icecast_source_check.rb +++ b/ruby/lib/jam_ruby/resque/scheduled/icecast_source_check.rb @@ -49,13 +49,13 @@ module JamRuby def handle_notifications(mount) if mount.listeners == 0 && mount.sourced # if no listeners, but we are sourced, then ask it to stop sourcing - @@log.debug("SOURCE_DOWN_REQUEST called on mount #{mount.name}") + log.debug("SOURCE_DOWN_REQUEST called on mount #{mount.name}") mount.notify_source_down_requested elsif mount.listeners > 0 && !mount.sourced # if we have some listeners, and still are not sourced, then ask to start sourcing again - @@log.debug("SOURCE_UP_REQUEST called on mount #{mount.name}") + log.debug("SOURCE_UP_REQUEST called on mount #{mount.name}") mount.notify_source_up_requested end diff --git a/web/app/assets/javascripts/sessionList.js b/web/app/assets/javascripts/sessionList.js index 61db4744e..78bffdaf3 100644 --- a/web/app/assets/javascripts/sessionList.js +++ b/web/app/assets/javascripts/sessionList.js @@ -23,10 +23,11 @@ // related to listen function stateChange(e, data) { - var $listenLink = e.element; // TODO: this is empty - console.log(e,$(this)) - var $listenText = $('.listen-link-text', $listenLink); - var $listenDetails = $('.listen-link-details', $listenLink); + var $listenLink = data.element; + var $parent = $listenLink.closest('.action-links') + //console.log(e,$(this)) + var $listenText = $('.listen-link-text', $parent); + var $listenDetails = $('.listen-link-details', $parent); if(data.displayText) {