small enhanceements
This commit is contained in:
parent
05124f272b
commit
5e3580deed
@ -159,7 +159,7 @@ function renderSongLi(song, liID, uri, playlistType){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resultsToTables(results, target, uri) {
|
function resultsToTables(results, target, uri) {
|
||||||
// console.log(target);
|
// console.log(results);
|
||||||
if (target == '#currenttable') {
|
if (target == '#currenttable') {
|
||||||
playlistType = 'playTrackQueueByUri';
|
playlistType = 'playTrackQueueByUri';
|
||||||
} else {
|
} else {
|
||||||
@ -180,18 +180,17 @@ function resultsToTables(results, target, uri) {
|
|||||||
$(target).attr('data', uri);
|
$(target).attr('data', uri);
|
||||||
var length = 0 || results.length;
|
var length = 0 || results.length;
|
||||||
for ( i = 0; i < length; i++) {
|
for ( i = 0; i < length; i++) {
|
||||||
newalbum.push(results[i]);
|
newalbum.push(results[i]);
|
||||||
nexturi = '';
|
nexturi = '';
|
||||||
if (i < length - 1) {
|
if (i < length - 1) {
|
||||||
nexturi = results[i + 1].album.uri;
|
nexturi = results[i + 1].album.uri;
|
||||||
}
|
}
|
||||||
if (!results[i].album) {
|
//console.log(results[i]);
|
||||||
if (results[i].uri) {
|
if (!results[i].album || (results[i].length == -1)) {
|
||||||
var name = results[i].name || results[i].uri;
|
var name = results[i].name || results[i].uri;
|
||||||
html += '<li class="albumli"><a href="#"><h1>' + name + ' [Stream]</h1></a></li>';
|
html += '<li class="albumli"><a href="#"><h1>' + name + ' [Stream]</h1></a></li>';
|
||||||
newalbum = [];
|
newalbum = [];
|
||||||
nexturi = '';
|
nexturi = '';
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (results[i].album.uri != nexturi) {
|
if (results[i].album.uri != nexturi) {
|
||||||
tableid = 'art' + i;
|
tableid = 'art' + i;
|
||||||
|
|||||||
@ -259,7 +259,6 @@ function initSocketevents() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
mopidy.on("event:trackPlaybackStarted", function(data) {
|
mopidy.on("event:trackPlaybackStarted", function(data) {
|
||||||
console.log(mopidy);
|
|
||||||
mopidy.playback.getTimePosition().then(processCurrentposition, console.error);
|
mopidy.playback.getTimePosition().then(processCurrentposition, console.error);
|
||||||
setPlayState(true);
|
setPlayState(true);
|
||||||
setSongInfo(data.tl_track.track);
|
setSongInfo(data.tl_track.track);
|
||||||
|
|||||||
@ -66,7 +66,7 @@ function processBrowseDir(resultArr) {
|
|||||||
if ((!resultArr) || (resultArr == '')) {
|
if ((!resultArr) || (resultArr == '')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(resultArr);
|
// console.log(resultArr);
|
||||||
|
|
||||||
if (resultArr.length == 0) {
|
if (resultArr.length == 0) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user