mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-04 02:09:23 +02:00
moves mpd playlist npsong css
This commit is contained in:
parent
5dd2629e82
commit
ae2f3804c0
2 changed files with 17 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
/* The AJAX stuff */
|
||||
var xmlHttp;
|
||||
var requestType="";
|
||||
var ret_songid=0;
|
||||
|
||||
|
||||
function createXMLHttpRequest() {
|
||||
|
@ -67,7 +68,20 @@ function handleStateChange() {
|
|||
case 'now_playing' :
|
||||
if (player == 'mpd' && player_state != 'stop') {
|
||||
mpd_song_length = el.getElementsByTagName ('songlength')[0].firstChild.data;
|
||||
mpd_songid = Math.round(el.getElementsByTagName ('songid')[0].firstChild.data);
|
||||
ret_songid = Math.round(el.getElementsByTagName ('songid')[0].firstChild.data);
|
||||
if (ret_songid != mpd_songid) {
|
||||
if (document.getElementById ('mpd_row'+mpd_songid) != null) {
|
||||
if ((mpd_songid - mpdpl_first) %2 == 1) {
|
||||
document.getElementById ('mpd_row'+mpd_songid).className = 'even';
|
||||
} else {
|
||||
document.getElementById ('mpd_row'+mpd_songid).className = 'odd';
|
||||
}
|
||||
}
|
||||
if (document.getElementById ('mpd_row'+ret_songid) != null) {
|
||||
document.getElementById ('mpd_row'+ret_songid).className = 'npsong';
|
||||
}
|
||||
mpd_songid = ret_songid;
|
||||
}
|
||||
document.getElementById ('mpd_npinfo').firstChild.data =
|
||||
1+mpd_songid + ". " +
|
||||
el.getElementsByTagName ('songartist')[0].firstChild.data + " - " +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue