mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-22 11:35:43 -04:00
[web] Set default values for uri and position to play a track
This commit is contained in:
parent
c312b2fdfe
commit
7adde0340e
@ -57,9 +57,9 @@ export default {
|
|||||||
name: 'ListItemTrackSpotify',
|
name: 'ListItemTrackSpotify',
|
||||||
components: { ModalDialogTrackSpotify },
|
components: { ModalDialogTrackSpotify },
|
||||||
props: {
|
props: {
|
||||||
context_uri: { required: true, type: String },
|
context_uri: { default: '', type: String },
|
||||||
item: { required: true, type: Object },
|
item: { required: true, type: Object },
|
||||||
position: { required: true, type: Number }
|
position: { default: 0, type: Number }
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return { show_details_modal: false }
|
return { show_details_modal: false }
|
||||||
@ -67,7 +67,11 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
play() {
|
play() {
|
||||||
if (this.item.is_playable) {
|
if (this.item.is_playable) {
|
||||||
webapi.player_play_uri(this.context_uri, false, this.position)
|
webapi.player_play_uri(
|
||||||
|
this.context_uri || this.item.uri,
|
||||||
|
false,
|
||||||
|
this.position
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,8 +44,6 @@
|
|||||||
v-for="track in tracks.items"
|
v-for="track in tracks.items"
|
||||||
:key="track.id"
|
:key="track.id"
|
||||||
:item="track"
|
:item="track"
|
||||||
:position="0"
|
|
||||||
:context_uri="track.uri"
|
|
||||||
/>
|
/>
|
||||||
<VueEternalLoading v-if="query.type === 'track'" :load="search_next">
|
<VueEternalLoading v-if="query.type === 'track'" :load="search_next">
|
||||||
<template #loading>
|
<template #loading>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user