mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-03-01 00:15:54 +01:00
Add: store for filtered podcast episodes
This commit is contained in:
parent
19a65dba98
commit
706b2d7d72
@ -89,6 +89,13 @@ export default {
|
|||||||
handler() {
|
handler() {
|
||||||
this.refresh()
|
this.refresh()
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
episodesList: {
|
||||||
|
handler(newList) {
|
||||||
|
const episodeIds = newList.map((ep) => ep.id)
|
||||||
|
this.$store.commit('setSortedEpisodeIds', episodeIds)
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -25,6 +25,7 @@ export const state = () => ({
|
|||||||
previousPath: '/',
|
previousPath: '/',
|
||||||
bookshelfBookIds: [],
|
bookshelfBookIds: [],
|
||||||
episodeTableEpisodeIds: [],
|
episodeTableEpisodeIds: [],
|
||||||
|
sortedEpisodeIds: [],
|
||||||
openModal: null,
|
openModal: null,
|
||||||
innerModalOpen: false,
|
innerModalOpen: false,
|
||||||
lastBookshelfScrollData: {},
|
lastBookshelfScrollData: {},
|
||||||
@ -61,6 +62,9 @@ export const getters = {
|
|||||||
getHomeBookshelfView: (state) => {
|
getHomeBookshelfView: (state) => {
|
||||||
if (!state.serverSettings || isNaN(state.serverSettings.homeBookshelfView)) return Constants.BookshelfView.STANDARD
|
if (!state.serverSettings || isNaN(state.serverSettings.homeBookshelfView)) return Constants.BookshelfView.STANDARD
|
||||||
return state.serverSettings.homeBookshelfView
|
return state.serverSettings.homeBookshelfView
|
||||||
|
},
|
||||||
|
getSortedEpisodeIds: (state) => {
|
||||||
|
return state.sortedEpisodeIds || []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,6 +150,9 @@ export const mutations = {
|
|||||||
setEpisodeTableEpisodeIds(state, val) {
|
setEpisodeTableEpisodeIds(state, val) {
|
||||||
state.episodeTableEpisodeIds = val || []
|
state.episodeTableEpisodeIds = val || []
|
||||||
},
|
},
|
||||||
|
setSortedEpisodeIds(state, episodeIds) {
|
||||||
|
state.sortedEpisodeIds = episodeIds || []
|
||||||
|
},
|
||||||
setPreviousPath(state, val) {
|
setPreviousPath(state, val) {
|
||||||
state.previousPath = val
|
state.previousPath = val
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user