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() {
|
||||
this.refresh()
|
||||
}
|
||||
},
|
||||
episodesList: {
|
||||
handler(newList) {
|
||||
const episodeIds = newList.map((ep) => ep.id)
|
||||
this.$store.commit('setSortedEpisodeIds', episodeIds)
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -25,6 +25,7 @@ export const state = () => ({
|
||||
previousPath: '/',
|
||||
bookshelfBookIds: [],
|
||||
episodeTableEpisodeIds: [],
|
||||
sortedEpisodeIds: [],
|
||||
openModal: null,
|
||||
innerModalOpen: false,
|
||||
lastBookshelfScrollData: {},
|
||||
@ -61,6 +62,9 @@ export const getters = {
|
||||
getHomeBookshelfView: (state) => {
|
||||
if (!state.serverSettings || isNaN(state.serverSettings.homeBookshelfView)) return Constants.BookshelfView.STANDARD
|
||||
return state.serverSettings.homeBookshelfView
|
||||
},
|
||||
getSortedEpisodeIds: (state) => {
|
||||
return state.sortedEpisodeIds || []
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,6 +150,9 @@ export const mutations = {
|
||||
setEpisodeTableEpisodeIds(state, val) {
|
||||
state.episodeTableEpisodeIds = val || []
|
||||
},
|
||||
setSortedEpisodeIds(state, episodeIds) {
|
||||
state.sortedEpisodeIds = episodeIds || []
|
||||
},
|
||||
setPreviousPath(state, val) {
|
||||
state.previousPath = val
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user