From c226026a51fc5503223ccae8b68a2ab968caa1e4 Mon Sep 17 00:00:00 2001 From: eb041592 <35889760+eb041592@users.noreply.github.com> Date: Wed, 4 Apr 2018 21:09:02 +0200 Subject: [PATCH] Treat album while browsing the same way as in the queue. --- htdocs/js/mpd.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/js/mpd.js b/htdocs/js/mpd.js index a79affa..7765644 100644 --- a/htdocs/js/mpd.js +++ b/htdocs/js/mpd.js @@ -241,8 +241,8 @@ function webSocketConnect() { $('#salamisandwich > tbody').append( "" + (obj.data[song].pos + 1) + "" + - "" + obj.data[song].artist + "" + obj.data[song].album + "" + - "" + obj.data[song].title + "" + + "" + obj.data[song].artist + "" + obj.data[song].album + "" + + "" + obj.data[song].title + "" + "" + minutes + ":" + (seconds < 10 ? '0' : '') + seconds + ""); } @@ -358,15 +358,17 @@ function webSocketConnect() { var minutes = Math.floor(obj.data[item].duration / 60); var seconds = obj.data[item].duration - minutes * 60; - if (typeof obj.data[item].artist === 'undefined') { - var details = "" + obj.data[item].title + ""; - } else { - var details = "" + obj.data[item].artist + "" + obj.data[item].album + "" + obj.data[item].title + ""; - } +// if (typeof obj.data[item].artist === 'undefined') { +// var details = "" + obj.data[item].title + ""; +// } else { +// var details = "" + obj.data[item].artist + "" + obj.data[item].album + "" + obj.data[item].title + ""; +// } - $('#salamisandwich > tbody').append( + $('#salamisandwich > tbody').append( "" + - "" + details + + "" + + "" + obj.data[song].artist + "" + obj.data[song].album + "" + + "" + obj.data[song].title + "" + "" + minutes + ":" + (seconds < 10 ? '0' : '') + seconds + "" ); -- 2.20.1