1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-06-25 22:23:16 +00:00

Fix: remove not needed data-* attributs

This commit is contained in:
jcorporation 2018-10-18 22:33:35 +01:00
parent 47ce3114a7
commit 7dbf1d0262

View File

@ -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;