From b39e472e2aee04b7068c246fc5e63844522861b3 Mon Sep 17 00:00:00 2001 From: whatdoineed2do/Ray Date: Mon, 24 Dec 2018 17:47:12 +0000 Subject: [PATCH 1/5] [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) { From c4cfbe024f91ef9690c2985385b32f087c15fe9f Mon Sep 17 00:00:00 2001 From: chme Date: Sun, 23 Dec 2018 10:34:46 +0100 Subject: [PATCH 2/5] [web-src] Files view --- web-src/src/components/ListItemDirectory.vue | 26 +++ web-src/src/components/ListItemPlaylist.vue | 3 + web-src/src/components/ListItemTrack.vue | 3 + .../src/components/ModalDialogDirectory.vue | 65 +++++++ web-src/src/components/NavbarTop.vue | 3 + web-src/src/pages/PageFiles.vue | 178 ++++++++++++++++++ web-src/src/router/index.js | 7 + web-src/src/webapi/index.js | 7 + 8 files changed, 292 insertions(+) create mode 100644 web-src/src/components/ListItemDirectory.vue create mode 100644 web-src/src/components/ModalDialogDirectory.vue create mode 100644 web-src/src/pages/PageFiles.vue diff --git a/web-src/src/components/ListItemDirectory.vue b/web-src/src/components/ListItemDirectory.vue new file mode 100644 index 00000000..8f8f9e3c --- /dev/null +++ b/web-src/src/components/ListItemDirectory.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/web-src/src/components/ListItemPlaylist.vue b/web-src/src/components/ListItemPlaylist.vue index bd2b3536..9d48e96b 100644 --- a/web-src/src/components/ListItemPlaylist.vue +++ b/web-src/src/components/ListItemPlaylist.vue @@ -1,5 +1,8 @@