1.9.6 misc bug fix
This commit is contained in:
parent
7c788a0efb
commit
5c334d7e3b
1 changed files with 20 additions and 15 deletions
|
@ -408,8 +408,14 @@ function playSong(el, songid, albumid) {
|
|||
success: function (data) {
|
||||
var title, artist, album;
|
||||
if (data["subsonic-response"].directory !== undefined) {
|
||||
// There is a bug in the API that doesn't return a JSON array for one artist
|
||||
var children = [];
|
||||
if (data["subsonic-response"].directory.child.length > 0) {
|
||||
$.each(data["subsonic-response"].directory.child, function (i, child) {
|
||||
children = data["subsonic-response"].directory.child;
|
||||
} else {
|
||||
children[0] = data["subsonic-response"].directory.child;
|
||||
}
|
||||
$.each(children, function (i, child) {
|
||||
if (child.id === songid) {
|
||||
title = child.title;
|
||||
artist = child.artist;
|
||||
|
@ -418,7 +424,6 @@ function playSong(el, songid, albumid) {
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
$('#songdetails_song').html(title);
|
||||
$('#songdetails_song').attr('parentid', albumid);
|
||||
$('#songdetails_song').attr('childid', songid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue