Merge pull request #1112 from whatdoineed2do/web-random-playlist

[web-src] random playlist playlist modal fix
This commit is contained in:
Christian Meffert 2020-11-02 20:01:06 +01:00 committed by GitHub
commit db5ba5bf47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -44,22 +44,22 @@ import webapi from '@/webapi'
export default {
name: 'ModalDialogPlaylist',
props: ['show', 'playlist', 'tracks'],
props: ['show', 'playlist', 'uris'],
methods: {
play: function () {
this.$emit('close')
webapi.player_play_uri(this.playlist.uri, false)
webapi.player_play_uri(this.uris ? this.uris : this.playlist.uri, false)
},
queue_add: function () {
this.$emit('close')
webapi.queue_add(this.playlist.uri)
webapi.queue_add(this.uris ? this.uris : this.playlist.uri)
},
queue_add_next: function () {
this.$emit('close')
webapi.queue_add_next(this.playlist.uri)
webapi.queue_add_next(this.uris ? this.uris : this.playlist.uri)
},
open_playlist: function () {

View File

@ -16,7 +16,7 @@
<template slot="content">
<p class="heading has-text-centered-mobile">{{ tracks.length }} tracks</p>
<list-tracks :tracks="tracks" :uris="uris"></list-tracks>
<modal-dialog-playlist :show="show_playlist_details_modal" :playlist="playlist" :tracks="playlist.random ? tracks : undefined" @close="show_playlist_details_modal = false" />
<modal-dialog-playlist :show="show_playlist_details_modal" :playlist="playlist" :uris="uris" @close="show_playlist_details_modal = false" />
</template>
</content-with-heading>
</template>