Fixed tracklistTab not working

This commit is contained in:
RemixDev 2020-04-20 19:03:59 +02:00
parent 592d2faa54
commit 55e002b9c9
2 changed files with 15 additions and 11 deletions

View File

@ -520,6 +520,7 @@ <h2><span v-if="metadata">{{ metadata }}</span><span v-if="release_date">{{ rele
<thead> <thead>
<tr> <tr>
<th v-for="data in head" v-html="data.title"></th> <th v-for="data in head" v-html="data.title"></th>
<th><input v-on:click="toggleAll(event)" class="selectAll" type="checkbox"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -365,6 +365,17 @@ var tracklistTab = new Vue({
}) })
} }
return selected.join(';') return selected.join(';')
},
convertDuration(duration) {
//convert from seconds only to mm:ss format
let mm, ss
mm = Math.floor(duration / 60)
ss = duration - mm * 60
//add leading zero if ss < 0
if (ss < 10) {
ss = '0' + ss
}
return mm + ':' + ss
} }
} }
}) })
@ -446,11 +457,7 @@ socket.on('show_album', function (data) {
{ title: '#' }, { title: '#' },
{ title: 'Song' }, { title: 'Song' },
{ title: 'Artist' }, { title: 'Artist' },
{ title: '<i class="material-icons">timer</i>', width: '40px' }, { title: '<i class="material-icons">timer</i>', width: '40px' }
{
title: '<input onclick="tracklistTab.toggleAll(event)" class="selectAll" type="checkbox"><span></span>',
width: '24px'
}
] ]
if (_.isEmpty(data.tracks)) { if (_.isEmpty(data.tracks)) {
tracklistTab.body = null tracklistTab.body = null
@ -472,11 +479,7 @@ socket.on('show_playlist', function (data) {
{ title: 'Song' }, { title: 'Song' },
{ title: 'Artist' }, { title: 'Artist' },
{ title: 'Album' }, { title: 'Album' },
{ title: '<i class="material-icons">timer</i>', width: '40px' }, { title: '<i class="material-icons">timer</i>', width: '40px' }
{
title: '<input onclick="tracklistTab.toggleAll(event)" class="selectAll" type="checkbox"><span></span>',
width: '24px'
}
] ]
if (_.isEmpty(data.tracks)) { if (_.isEmpty(data.tracks)) {
tracklistTab.body = null tracklistTab.body = null