Fix:Open stream update with full audiobook object #255

This commit is contained in:
advplyr 2021-12-25 07:22:46 -06:00
parent e62037c91c
commit 49fcaefd01
3 changed files with 6 additions and 1 deletions

View File

@ -182,6 +182,8 @@ export default {
},
streamOpen(stream) {
this.stream = stream
this.$store.commit('updateStreamAudiobook', stream.audiobook)
if (this.$refs.audioPlayer) {
console.log('[StreamContainer] streamOpen', stream)
this.openStream()

View File

@ -110,6 +110,9 @@ export const mutations = {
state.playOnLoad = true
state.streamAudiobook = audiobook
},
updateStreamAudiobook(state, audiobook) { // Initial stream audiobook is minified, on open audiobook is updated to full
state.streamAudiobook = audiobook
},
setStream(state, stream) {
state.playOnLoad = false
state.streamAudiobook = stream ? stream.audiobook : null

View File

@ -129,7 +129,7 @@ class Stream extends EventEmitter {
id: this.id,
clientId: this.client.id,
userId: this.client.user.id,
audiobook: this.audiobook.toJSONMinified(),
audiobook: this.audiobook.toJSONExpanded(),
segmentLength: this.segmentLength,
playlistPath: this.playlistPath,
clientPlaylistUri: this.clientPlaylistUri,