From 55e002b9c911b0d00d50f53b807ef959edcecdc3 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Mon, 20 Apr 2020 19:03:59 +0200 Subject: [PATCH] Fixed tracklistTab not working --- public/index.html | 3 ++- public/js/app.js | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/public/index.html b/public/index.html index 18ad9fe..91f0dc9 100644 --- a/public/index.html +++ b/public/index.html @@ -520,6 +520,7 @@

{{ metadata }}{{ rele + @@ -589,4 +590,4 @@

{{ metadata }}{{ rele - \ No newline at end of file + diff --git a/public/js/app.js b/public/js/app.js index fa7c164..9389674 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -365,6 +365,17 @@ var tracklistTab = new Vue({ }) } 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: 'Song' }, { title: 'Artist' }, - { title: 'timer', width: '40px' }, - { - title: '', - width: '24px' - } + { title: 'timer', width: '40px' } ] if (_.isEmpty(data.tracks)) { tracklistTab.body = null @@ -472,11 +479,7 @@ socket.on('show_playlist', function (data) { { title: 'Song' }, { title: 'Artist' }, { title: 'Album' }, - { title: 'timer', width: '40px' }, - { - title: '', - width: '24px' - } + { title: 'timer', width: '40px' } ] if (_.isEmpty(data.tracks)) { tracklistTab.body = null