mirror of
https://github.com/SuperBFG7/ympd
synced 2025-11-07 17:13:01 +00:00
Fix: remove not needed data-* attributs
This commit is contained in:
@@ -1186,6 +1186,9 @@ function parseFilesystem(obj) {
|
|||||||
var row = document.createElement('tr');
|
var row = document.createElement('tr');
|
||||||
row.setAttribute('data-type', obj.data[i].type);
|
row.setAttribute('data-type', obj.data[i].type);
|
||||||
row.setAttribute('data-uri', uri);
|
row.setAttribute('data-uri', uri);
|
||||||
|
if (obj.data[i].type == 'song')
|
||||||
|
row.setAttribute('data-name', obj.data[i].Title);
|
||||||
|
else
|
||||||
row.setAttribute('data-name', obj.data[i].name);
|
row.setAttribute('data-name', obj.data[i].name);
|
||||||
|
|
||||||
switch(obj.data[i].type) {
|
switch(obj.data[i].type) {
|
||||||
@@ -1295,7 +1298,7 @@ function parsePlaylists(obj) {
|
|||||||
row.setAttribute('id','playlistTrackId' + songpos);
|
row.setAttribute('id','playlistTrackId' + songpos);
|
||||||
row.setAttribute('data-type', obj.data[i].type);
|
row.setAttribute('data-type', obj.data[i].type);
|
||||||
row.setAttribute('data-uri', uri);
|
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);
|
row.setAttribute('data-songpos', songpos);
|
||||||
var minutes = Math.floor(obj.data[i].duration / 60);
|
var minutes = Math.floor(obj.data[i].duration / 60);
|
||||||
var seconds = obj.data[i].duration - minutes * 60;
|
var seconds = obj.data[i].duration - minutes * 60;
|
||||||
|
|||||||
Reference in New Issue
Block a user