From: eb041592 <35889760+eb041592@users.noreply.github.com>
Date: Wed, 4 Apr 2018 19:09:02 +0000 (+0200)
Subject: Treat album while browsing the same way as in the queue.
X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=c226026a51fc5503223ccae8b68a2ab968caa1e4;p=ympd.git
Treat album while browsing the same way as in the queue.
---
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 +
" | |
"
);