Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+var TOKEN = "";
+
var socket;
var last_state;
var last_outputs;
this.get(/\#\/dirble\/(\d+)\/(\d+)/, function() {
+
+ if (TOKEN === "") context.redirect("#/0");
+
prepare();
current_app = 'dirble';
$('#breadcrump').removeClass('hide').empty().append("<li><a href=\"#/dirble/\">Categories</a></li><li>"+dirble_selected_cat+"</li>");
this.get(/\#\/dirble\//, function() {
+
+ if (TOKEN === "") context.redirect("#/0");
+
prepare();
current_app = 'dirble';
$('#breadcrump').removeClass('hide').empty().append("<li>Categories</li>");
else
if ($.cookie("notification") === "true")
$('#btnnotify').addClass("active")
+
+ if (TOKEN === "") $('#dirble').addClass('hide');
+
});
dirble_page = 1;
- $.getJSON( "http://api.dirble.com/v2/categories?token=2e223c9909593b94fc6577361a", function( data ) {
+ $.getJSON( "http://api.dirble.com/v2/categories?token="+TOKEN, function( data ) {
$('#dirble_loading').addClass('hide');
function dirble_load_stations() {
- $.getJSON( "http://api.dirble.com/v2/category/"+dirble_catid+"/stations?page="+dirble_page+"&per_page=20&token=2e223c9909593b94fc6577361a", function( data ) {
+ $.getJSON( "http://api.dirble.com/v2/category/"+dirble_catid+"/stations?page="+dirble_page+"&per_page=20&token="+TOKEN, function( data ) {
$('#dirble_loading').addClass('hide');
if (data.length == 20) $('#next').removeClass('hide');
click: function() {
var _this = $(this);
- $.getJSON( "http://api.dirble.com/v2/station/"+$(this).attr("radioid")+"?token=2e223c9909593b94fc6577361a", function( data ) {
+ $.getJSON( "http://api.dirble.com/v2/station/"+$(this).attr("radioid")+"?token="+TOKEN, function( data ) {
socket.send("MPD_API_ADD_TRACK," + data.streams[0].stream);
$('.top-right').notify({
"<span class=\"glyphicon glyphicon-play\"></span></a>").find('a').click(function(e) {
e.stopPropagation();
- $.getJSON( "http://api.dirble.com/v2/station/"+_this.attr("radioid")+"?token=2e223c9909593b94fc6577361a", function( data ) {
+ $.getJSON( "http://api.dirble.com/v2/station/"+_this.attr("radioid")+"?token="+TOKEN, function( data ) {
socket.send("MPD_API_ADD_PLAY_TRACK," + data.streams[0].stream);
$('.top-right').notify({
click: function() {
var _this = $(this);
- $.getJSON( "http://api.dirble.com/v2/station/"+$(this).attr("radioid")+"?token=2e223c9909593b94fc6577361a", function( data ) {
+ $.getJSON( "http://api.dirble.com/v2/station/"+$(this).attr("radioid")+"?token="+TOKEN, function( data ) {
socket.send("MPD_API_ADD_TRACK," + data.streams[0].stream);
$('.top-right').notify({
"<span class=\"glyphicon glyphicon-play\"></span></a>").find('a').click(function(e) {
e.stopPropagation();
- $.getJSON( "http://api.dirble.com/v2/station/"+_this.attr("radioid")+"?token=2e223c9909593b94fc6577361a", function( data ) {
+ $.getJSON( "http://api.dirble.com/v2/station/"+_this.attr("radioid")+"?token="+TOKEN, function( data ) {
socket.send("MPD_API_ADD_PLAY_TRACK," + data.streams[0].stream);
$('.top-right').notify({