From af629e4fcb53409ec26096551ff0ddc85ef53977 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sat, 18 Apr 2020 12:08:43 +0200 Subject: [PATCH] Started working on playlist tab --- public/index.html | 3 ++- public/js/app/stackedTabs.js | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index f55602f..9ff4769 100644 --- a/public/index.html +++ b/public/index.html @@ -422,10 +422,11 @@

{{ metadata }}{{ rele {{ track.track_position }} explicit{{ track.title }} {{track.title_version}} {{ track.artist.name }} + {{ track.album.title }} {{ convertDuration(track.duration) }} - + album{{ track.number }} diff --git a/public/js/app/stackedTabs.js b/public/js/app/stackedTabs.js index cb1f654..974a3ea 100644 --- a/public/js/app/stackedTabs.js +++ b/public/js/app/stackedTabs.js @@ -168,3 +168,26 @@ socket.on('show_album', function(data){ tracklistTab.body = data.tracks } }) + +socket.on('show_playlist', function(data){ + tracklistTab.type = "Playlist" + tracklistTab.link = `https://www.deezer.com/playlist/${data.id}` + tracklistTab.title = data.title + tracklistTab.image = data.picture_xl + tracklistTab.release_date = data.creation_date.substring(0,10) + tracklistTab.metadata = `by ${data.creator.name} • ${data.tracks.length} songs` + tracklistTab.head = [ + {title: 'music_note', width: "24px"}, + {title: '#'}, + {title: 'Song'}, + {title: 'Artist'}, + {title: 'Album'}, + {title: 'timer', width: "40px"}, + {title: '
', width: "24px"} + ] + if (_.isEmpty(data.tracks)){ + tracklistTab.body = null + }else{ + tracklistTab.body = data.tracks + } +})