/** * File: app/radio.js * Author: Gerrit Linnemann * * Where the magic happens. */ // load the things we need //nothing yet var App = null; var Log = null var Helper = null; var Conf = null; exports.init = function(Express, Configuration) { App = Express; Conf = Configuration; Log = App.get('Log'); Helper = App.get('Helper'); Log.debug('Radio: ' + exports.countChannels() + ' channels configured'); Helper.each(Conf.channels, function(channel, isLast) { //Log.inspect('Channel', channel); Log.log('Radio: Found channel ' + channel.title); }); return this; } exports.countChannels = function() { return Conf.channels.length; } exports.getChannels = function() { return Conf.channels; }