mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-15 05:41:34 +00:00
Add: "Play Next" button for book and podcast cards
This commit is contained in:
parent
0d0bdce337
commit
c18f722929
19 changed files with 63 additions and 2 deletions
|
|
@ -188,6 +188,15 @@ export const mutations = {
|
|||
state.playerQueueItems.push(item)
|
||||
}
|
||||
},
|
||||
addItemToTopOfQueue(state, item) {
|
||||
const exists = state.playerQueueItems.some(i => {
|
||||
if (!i.episodeId) return i.libraryItemId === item.libraryItemId
|
||||
return i.libraryItemId === item.libraryItemId && i.episodeId === item.episodeId
|
||||
})
|
||||
if (!exists) {
|
||||
state.playerQueueItems.splice(1, 0, item)
|
||||
}
|
||||
},
|
||||
setPlayerQueueAutoPlay(state, autoPlay) {
|
||||
state.playerQueueAutoPlay = !!autoPlay
|
||||
localStorage.setItem('playerQueueAutoPlay', !!autoPlay ? '1' : '0')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue