diff --git a/public/css/modules/stackedTabs.css b/public/css/modules/stackedTabs.css
index 2c61c9c..1ab5299 100644
--- a/public/css/modules/stackedTabs.css
+++ b/public/css/modules/stackedTabs.css
@@ -1,4 +1,4 @@
-#artist_tab header{
+.image_header header{
background-position: 0% 35%;
background-size: cover;
padding: 220px 24px 8px;
diff --git a/public/index.html b/public/index.html
index 0a6425d..7693176 100644
--- a/public/index.html
+++ b/public/index.html
@@ -364,7 +364,7 @@
Settings
About
-
+
{{ title }}
get_app
@@ -385,18 +385,16 @@ {{ title }}
-
-
-
-
- explicit
- {{release.title}}
- fiber_new
- |
- {{release.release_date}} |
- file_download |
-
-
+
+
+
+ explicit
+ {{release.title}}
+ fiber_new
+ |
+ {{release.release_date}} |
+ file_download |
+
@@ -405,13 +403,33 @@ {{ title }}
-
-
+
+
{{ title }} explicit
{{ metadata }}{{ release_date }}
+
+
diff --git a/public/js/app/stackedTabs.js b/public/js/app/stackedTabs.js
index 8a6c834..cb1f654 100644
--- a/public/js/app/stackedTabs.js
+++ b/public/js/app/stackedTabs.js
@@ -67,7 +67,14 @@ var tracklistTab = new Vue({
},
methods: {
addToQueue: function(e){e.stopPropagation(); sendAddToQueue(e.currentTarget.dataset.link)},
- openQualityModal: function(e){e.preventDefault(); openQualityModal(e.currentTarget.dataset.link)}
+ openQualityModal: function(e){e.preventDefault(); openQualityModal(e.currentTarget.dataset.link)},
+ toggleAll: function(e){
+ tracklistTab.body.forEach((item) => {
+ if (item.type == 'track'){
+ item.selected = e.currentTarget.checked
+ }
+ });
+ }
}
})
@@ -122,7 +129,7 @@ socket.on('show_artist', function(data){
artistTab.image = data.picture_xl
artistTab.type = "Artist"
artistTab.link = `https://www.deezer.com/artist/${data.id}`
- artistTab.currentTab = Object.keys(data.data)[0]
+ artistTab.currentTab = Object.keys(data.releases)[0]
artistTab.sortKey = 'release_date'
artistTab.sortOrder = 'desc'
artistTab.head = [
@@ -130,9 +137,34 @@ socket.on('show_artist', function(data){
{title: 'Release Date', sortKey: "release_date"},
{title: '', width: "56px"}
]
- if (_.isEmpty(data.data)){
+ if (_.isEmpty(data.releases)){
artistTab.body = null
}else{
- artistTab.body = data.data
+ artistTab.body = data.releases
+ }
+})
+
+socket.on('show_album', function(data){
+ tracklistTab.type = 'Album'
+ tracklistTab.link = `https://www.deezer.com/album/${data.id}`
+ tracklistTab.title = data.title
+ tracklistTab.explicit = data.explicit_lyrics
+ tracklistTab.label = data.label
+ tracklistTab.metadata = `${data.artist.name} • ${data.tracks.length} songs`
+ tracklistTab.release_date = data.release_date.substring(0,10)
+ tracklistTab.image = data.cover_xl
+ console.log(data.tracks)
+ tracklistTab.head = [
+ {title: 'music_note', width: "24px"},
+ {title: '#'},
+ {title: 'Song'},
+ {title: 'Artist'},
+ {title: 'timer', width: "40px"},
+ {title: '', width: "24px"}
+ ]
+ if (_.isEmpty(data.tracks)){
+ tracklistTab.body = null
+ }else{
+ tracklistTab.body = data.tracks
}
})