mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-08 00:08:14 +01:00
Fix:Open stream update with full audiobook object #255
This commit is contained in:
parent
e62037c91c
commit
49fcaefd01
@ -182,6 +182,8 @@ export default {
|
|||||||
},
|
},
|
||||||
streamOpen(stream) {
|
streamOpen(stream) {
|
||||||
this.stream = stream
|
this.stream = stream
|
||||||
|
this.$store.commit('updateStreamAudiobook', stream.audiobook)
|
||||||
|
|
||||||
if (this.$refs.audioPlayer) {
|
if (this.$refs.audioPlayer) {
|
||||||
console.log('[StreamContainer] streamOpen', stream)
|
console.log('[StreamContainer] streamOpen', stream)
|
||||||
this.openStream()
|
this.openStream()
|
||||||
|
@ -110,6 +110,9 @@ export const mutations = {
|
|||||||
state.playOnLoad = true
|
state.playOnLoad = true
|
||||||
state.streamAudiobook = audiobook
|
state.streamAudiobook = audiobook
|
||||||
},
|
},
|
||||||
|
updateStreamAudiobook(state, audiobook) { // Initial stream audiobook is minified, on open audiobook is updated to full
|
||||||
|
state.streamAudiobook = audiobook
|
||||||
|
},
|
||||||
setStream(state, stream) {
|
setStream(state, stream) {
|
||||||
state.playOnLoad = false
|
state.playOnLoad = false
|
||||||
state.streamAudiobook = stream ? stream.audiobook : null
|
state.streamAudiobook = stream ? stream.audiobook : null
|
||||||
|
@ -129,7 +129,7 @@ class Stream extends EventEmitter {
|
|||||||
id: this.id,
|
id: this.id,
|
||||||
clientId: this.client.id,
|
clientId: this.client.id,
|
||||||
userId: this.client.user.id,
|
userId: this.client.user.id,
|
||||||
audiobook: this.audiobook.toJSONMinified(),
|
audiobook: this.audiobook.toJSONExpanded(),
|
||||||
segmentLength: this.segmentLength,
|
segmentLength: this.segmentLength,
|
||||||
playlistPath: this.playlistPath,
|
playlistPath: this.playlistPath,
|
||||||
clientPlaylistUri: this.clientPlaylistUri,
|
clientPlaylistUri: this.clientPlaylistUri,
|
||||||
|
Loading…
Reference in New Issue
Block a user