Add:Filter and sort for podcast episodes table, Update:Sync local media progress when media progress is updated on the server

This commit is contained in:
advplyr
2022-06-01 19:38:26 -05:00
parent c4aca22c28
commit 99bf960b8a
10 changed files with 283 additions and 10 deletions
+9
View File
@@ -36,6 +36,12 @@ export const getters = {
if (episodeId != null && lmp.localEpisodeId != episodeId) return false
return lmp.localLibraryItemId == localLibraryItemId
})
},
getLocalMediaProgressByServerItemId: (state) => (libraryItemId, episodeId = null) => {
return state.localMediaProgress.find(lmp => {
if (episodeId != null && lmp.episodeId != episodeId) return false
return lmp.libraryItemId == libraryItemId
})
}
}
@@ -84,6 +90,9 @@ export const mutations = {
removeLocalMediaProgress(state, id) {
state.localMediaProgress = state.localMediaProgress.filter(lmp => lmp.id != id)
},
removeLocalMediaProgressForItem(state, llid) {
state.localMediaProgress = state.localMediaProgress.filter(lmp => lmp.localLibraryItemId !== llid)
},
setLastSearch(state, val) {
state.lastSearch = val
}