From b39e472e2aee04b7068c246fc5e63844522861b3 Mon Sep 17 00:00:00 2001 From: whatdoineed2do/Ray Date: Mon, 24 Dec 2018 17:47:12 +0000 Subject: [PATCH] [web-src] genre play/add to Q uses genre track lists and not the album tracks (which may incl tracks of other genres) --- web-src/src/components/ModalDialogGenre.vue | 12 ++++++------ web-src/src/pages/PageGenre.vue | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/web-src/src/components/ModalDialogGenre.vue b/web-src/src/components/ModalDialogGenre.vue index 974b3681..5a003ffe 100644 --- a/web-src/src/components/ModalDialogGenre.vue +++ b/web-src/src/components/ModalDialogGenre.vue @@ -39,22 +39,22 @@ export default { methods: { play: function () { this.$emit('close') - webapi.library_genre(this.genre.name).then(({ data }) => - webapi.player_play_uri(data.albums.items.map(a => a.uri).join(','), false) + webapi.library_genre_tracks(this.genre.name).then(({ data }) => + webapi.player_play_uri(data.tracks.items.map(a => a.uri).join(','), false) ) }, queue_add: function () { this.$emit('close') - webapi.library_genre(this.genre.name).then(({ data }) => - webapi.queue_add(data.albums.items.map(a => a.uri).join(',')) + webapi.library_genre_tracks(this.genre.name).then(({ data }) => + webapi.queue_add(data.tracks.items.map(a => a.uri).join(',')) ) }, queue_add_next: function () { this.$emit('close') - webapi.library_genre(this.genre.name).then(({ data }) => - webapi.queue_add_next(data.albums.items.map(a => a.uri).join(',')) + webapi.library_genre_tracks(this.genre.name).then(({ data }) => + webapi.queue_add_next(data.tracks.items.map(a => a.uri).join(',')) ) }, diff --git a/web-src/src/pages/PageGenre.vue b/web-src/src/pages/PageGenre.vue index 9c7430b8..6e055cf7 100644 --- a/web-src/src/pages/PageGenre.vue +++ b/web-src/src/pages/PageGenre.vue @@ -76,7 +76,9 @@ export default { }, play: function () { - webapi.player_play_uri(this.genre_albums.items.map(a => a.uri).join(','), true) + webapi.library_genre_tracks(this.name).then(({ data }) => + webapi.player_play_uri(data.tracks.items.map(a => a.uri).join(','), true) + ) }, open_album: function (album) {