fix:Javascript syntax errors.
This commit is contained in:
parent
f5c36d4b20
commit
28a42f40eb
@ -225,7 +225,7 @@ function saveQueue() {
|
|||||||
exists = exists || existing[i].uri.indexOf("m3u:") == 0 || existing[i].uri.indexOf("local:") == 0;
|
exists = exists || existing[i].uri.indexOf("m3u:") == 0 || existing[i].uri.indexOf("local:") == 0;
|
||||||
}
|
}
|
||||||
if (!exists || window.confirm("Overwrite existing playlist \"" + plname + "\"?")) {
|
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;
|
playlist.tracks = tracks;
|
||||||
mopidy.playlists.save({'playlist': playlist}).then();
|
mopidy.playlists.save({'playlist': playlist}).then();
|
||||||
getPlaylists();
|
getPlaylists();
|
||||||
|
|||||||
@ -484,10 +484,10 @@ $(document).ready(function(event) {
|
|||||||
if (websocketUrl) {
|
if (websocketUrl) {
|
||||||
mopidy = new Mopidy({
|
mopidy = new Mopidy({
|
||||||
webSocketUrl: websocketUrl, // wslocation is set in index.html from the extention config.
|
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 {
|
} 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.log.bind(console)); // Log all events
|
||||||
// mopidy.on(console.error.bind(console));
|
// mopidy.on(console.error.bind(console));
|
||||||
|
|||||||
@ -211,6 +211,9 @@ function getBrowseDir(rootdir) {
|
|||||||
} else {
|
} else {
|
||||||
browseStack.push(rootdir);
|
browseStack.push(rootdir);
|
||||||
}
|
}
|
||||||
|
if (!rootdir) {
|
||||||
|
rootdir = null;
|
||||||
|
}
|
||||||
mopidy.library.browse({'uri': rootdir}).then(processBrowseDir, console.error);
|
mopidy.library.browse({'uri': rootdir}).then(processBrowseDir, console.error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user