From 7dbf1d02625e65eeaa92fd686b9bcc68e8473c15 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Thu, 18 Oct 2018 22:33:35 +0100 Subject: [PATCH] Fix: remove not needed data-* attributs --- htdocs/js/mympd.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/js/mympd.js b/htdocs/js/mympd.js index d776ad5..88d6fb0 100644 --- a/htdocs/js/mympd.js +++ b/htdocs/js/mympd.js @@ -1186,7 +1186,10 @@ function parseFilesystem(obj) { var row = document.createElement('tr'); row.setAttribute('data-type', obj.data[i].type); row.setAttribute('data-uri', uri); - row.setAttribute('data-name', obj.data[i].name); + if (obj.data[i].type == 'song') + row.setAttribute('data-name', obj.data[i].Title); + else + row.setAttribute('data-name', obj.data[i].name); switch(obj.data[i].type) { case 'dir': @@ -1295,7 +1298,7 @@ function parsePlaylists(obj) { row.setAttribute('id','playlistTrackId' + songpos); row.setAttribute('data-type', obj.data[i].type); row.setAttribute('data-uri', uri); - row.setAttribute('data-name', obj.data[i].name); + row.setAttribute('data-name', obj.data[i].Title); row.setAttribute('data-songpos', songpos); var minutes = Math.floor(obj.data[i].duration / 60); var seconds = obj.data[i].duration - minutes * 60;