});
$('#buttonPlEmpty').click(function(){
sendCommand({'command':'pl_empty'})
+ updatePlayList(true);
return false;
});
$('#buttonLoop').click(function(){
};
});
$('#libraryTree').jstree('deselect_all');
- setTimeout(updatePlayList,1000);
+ setTimeout(function(){updatePlayList(true);},1000);
return false;
});
$('#buttonStreams, #buttonStreams2').click(function(){
$('#libraryTree').jstree('refresh', -1);
} else {
//iterate through playlist..
+ var match = false;
$('.jstree-leaf').each(function(){
var id = $(this).attr('id');
if (id != null && id.substr(0,5) == 'plid_') {
$(this).addClass('ui-state-highlight');
$(this).attr('current', 'current');
this.scrollIntoView(true);
+ match = true;
} else {
$(this).removeClass('ui-state-highlight');
$(this).removeAttr('current');
}
}
});
+ //local title wasn't found - refresh playlist..
+ if (!match) updatePlayList(true);
}
}
break;
default:
sendCommand('command=in_play&input=' + encodeURIComponent($(this).attr('openfile')));
+ updatePlayList(true);
break;
}
$('#window_browse').dialog('close');