fix:Javascript syntax errors.

This commit is contained in:
jcass 2016-01-30 15:08:17 +02:00
parent f5c36d4b20
commit 28a42f40eb
3 changed files with 6 additions and 3 deletions

View File

@ -225,7 +225,7 @@ function saveQueue() {
exists = exists || existing[i].uri.indexOf("m3u:") == 0 || existing[i].uri.indexOf("local:") == 0;
}
if (!exists || window.confirm("Overwrite existing playlist \"" + plname + "\"?")) {
mopidy.playlists.create({'name': plname, 'uri_scheme': "local").then(function(playlist) {
mopidy.playlists.create({'name': plname, 'uri_scheme': "local"}).then(function(playlist) {
playlist.tracks = tracks;
mopidy.playlists.save({'playlist': playlist}).then();
getPlaylists();

View File

@ -484,10 +484,10 @@ $(document).ready(function(event) {
if (websocketUrl) {
mopidy = new Mopidy({
webSocketUrl: websocketUrl, // wslocation is set in index.html from the extention config.
callingConvention: "by-position-or-by-name"
callingConvention: 'by-position-or-by-name'
});
} else {
mopidy = new Mopidy({callingConvention: "by-position-or-by-name"});
mopidy = new Mopidy({callingConvention: 'by-position-or-by-name'});
}
// mopidy.on(console.log.bind(console)); // Log all events
// mopidy.on(console.error.bind(console));

View File

@ -211,6 +211,9 @@ function getBrowseDir(rootdir) {
} else {
browseStack.push(rootdir);
}
if (!rootdir) {
rootdir = null;
}
mopidy.library.browse({'uri': rootdir}).then(processBrowseDir, console.error);
}