Skip to content
Snippets Groups Projects
Commit 98c0d761 authored by ale's avatar ale
Browse files

Merge branch 'master' of https://git.autistici.org/djrandom

parents 63bd945c bddf87e6
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ djr.init = function (userid) {
// Set a callback on URL hash changes.
$(window).bind('hashchange', djr.history.restore);
djr.history.restore();
// Set autocompletion and search handlers.
$('#queryField').autocomplete('/autocomplete', {
......
......@@ -32,10 +32,12 @@ djr.Player.prototype.hideAllChunks = function() {
djr.Player.prototype.removeChunk = function(chunk_id) {
this.playlist.removeChunk(chunk_id);
$('#chunk_' + chunk_id).remove();
this.savePlaylist();
// If the playlist is now empty, switch to a new uuid.
if (this.playlist.isEmpty()) {
this.clearPlaylist();
} else {
// Only save the playlist if not empty.
this.savePlaylist();
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment