From 4895c12b6d4aa458ea34e9b60ab5065f74c19d70 Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 6 May 2015 18:18:27 +0000 Subject: [PATCH] fix for nowplaying --- modules/radio/radio.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/radio/radio.js b/modules/radio/radio.js index bf10781..5b6c400 100644 --- a/modules/radio/radio.js +++ b/modules/radio/radio.js @@ -9,6 +9,7 @@ var _ = require('underscore')._, var radio = function(dbot) { this.listening = false; this.data = false; + this.title = false; this.stream = false; this.internalAPI = { 'startRadio': function() { @@ -34,7 +35,7 @@ var radio = function(dbot) { stream.on('metadata', function(metadata) { this.title = icecast.parseMetadata(metadata).StreamTitle; - if(!_.isUndefined(title) && this.data['icy-name']) { // sowwy jesus + if(!_.isUndefined(this.title) && this.data['icy-name']) { // sowwy jesus _.each(this.config.announce, function(a) { dbot.say(a.server, a.name, dbot.t('now_playing', { 'name': this.data['icy-name'],