mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 11:41:36 +00:00
merge upstream
This commit is contained in:
commit
61bf30e08a
89 changed files with 2963 additions and 1805 deletions
|
|
@ -6,7 +6,9 @@ export const state = () => ({
|
|||
showUserCollectionsModal: false,
|
||||
showEditCollectionModal: false,
|
||||
selectedCollection: null,
|
||||
showBookshelfTextureModal: false
|
||||
showBookshelfTextureModal: false,
|
||||
isCasting: false, // Actively casting
|
||||
isChromecastInitialized: false // Script loaded
|
||||
})
|
||||
|
||||
export const getters = {}
|
||||
|
|
@ -33,5 +35,11 @@ export const mutations = {
|
|||
},
|
||||
setShowBookshelfTextureModal(state, val) {
|
||||
state.showBookshelfTextureModal = val
|
||||
},
|
||||
setChromecastInitialized(state, val) {
|
||||
state.isChromecastInitialized = val
|
||||
},
|
||||
setCasting(state, val) {
|
||||
state.isCasting = val
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,6 @@ export const state = () => ({
|
|||
showEReader: false,
|
||||
selectedAudiobook: null,
|
||||
selectedAudiobookFile: null,
|
||||
playOnLoad: false,
|
||||
developerMode: false,
|
||||
selectedAudiobooks: [],
|
||||
processingBatch: false,
|
||||
|
|
@ -78,25 +77,8 @@ export const mutations = {
|
|||
state.versionData = versionData
|
||||
},
|
||||
setStreamAudiobook(state, audiobook) {
|
||||
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
|
||||
},
|
||||
clearStreamAudiobook(state, audiobookId) {
|
||||
if (state.streamAudiobook && state.streamAudiobook.id === audiobookId) {
|
||||
state.playOnLoad = false
|
||||
state.streamAudiobook = null
|
||||
}
|
||||
},
|
||||
setPlayOnLoad(state, val) {
|
||||
state.playOnLoad = val
|
||||
},
|
||||
showEditModal(state, audiobook) {
|
||||
state.editModalTab = 'details'
|
||||
state.selectedAudiobook = audiobook
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ export const getters = {
|
|||
},
|
||||
getSortedLibraries: state => () => {
|
||||
return state.libraries.map(lib => ({ ...lib })).sort((a, b) => a.displayOrder - b.displayOrder)
|
||||
},
|
||||
getLibraryProvider: state => libraryId => {
|
||||
var library = state.libraries.find(l => l.id === libraryId)
|
||||
if (!library) return null
|
||||
return library.provider
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue