diff --git a/client/components/app/StreamContainer.vue b/client/components/app/StreamContainer.vue index 1e4850df..0c5afd09 100644 --- a/client/components/app/StreamContainer.vue +++ b/client/components/app/StreamContainer.vue @@ -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() diff --git a/client/store/index.js b/client/store/index.js index 35622679..443aabad 100644 --- a/client/store/index.js +++ b/client/store/index.js @@ -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 diff --git a/server/objects/Stream.js b/server/objects/Stream.js index 033b17e1..210f40de 100644 --- a/server/objects/Stream.js +++ b/server/objects/Stream.js @@ -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,