Persist bookshelf list view setting, fix collections for new data model, add authors cards, update filters

This commit is contained in:
advplyr
2022-04-08 19:05:32 -05:00
parent f309e1fcf2
commit 9ad351f0d7
18 changed files with 296 additions and 67 deletions
+8 -5
View File
@@ -22,9 +22,12 @@ export const getters = {
getServerAddress: (state) => {
return state.serverConnectionConfig ? state.serverConnectionConfig.address : null
},
getUserLibraryItemProgress: (state) => (libraryItemId) => {
if (!state.user || !state.user.libraryItemProgress) return null
return state.user.libraryItemProgress.find(li => li.id == libraryItemId)
getUserMediaProgress: (state) => (libraryItemId, episodeId = null) => {
if (!state.user || !state.user.mediaProgress) return null
return state.user.mediaProgress.find(li => {
if (episodeId && li.episodeId !== episodeId) return false
return li.id == libraryItemId
})
},
getUserBookmarksForItem: (state) => (libraryItemId) => {
if (!state.user.bookmarks) return []
@@ -36,8 +39,8 @@ export const getters = {
}
export const actions = {
async updateUserSettings({ commit }, payload) {
if (this.$server.connected) {
async updateUserSettings({ state, commit }, payload) {
if (state.serverConnectionConfig) {
var updatePayload = {
...payload
}