mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-03 22:49:42 +00:00
Reset filters and search when switching libraries
This commit is contained in:
parent
f7506e84d3
commit
8f189763f0
5 changed files with 47 additions and 3 deletions
|
|
@ -83,8 +83,14 @@ export const getters = {
|
|||
|
||||
export const actions = {
|
||||
// When changing libraries make sure sort and filter is still valid
|
||||
checkUpdateLibrarySortFilter({ state, dispatch, commit }, mediaType) {
|
||||
checkUpdateLibrarySortFilter({ state, dispatch, commit }, { mediaType, libraryChanging }) {
|
||||
const settingsUpdate = {}
|
||||
|
||||
if (libraryChanging) {
|
||||
settingsUpdate.filterBy = 'all'
|
||||
settingsUpdate.seriesFilterBy = 'all'
|
||||
}
|
||||
|
||||
if (mediaType == 'podcast') {
|
||||
if (state.settings.orderBy == 'media.metadata.authorName' || state.settings.orderBy == 'media.metadata.authorNameLF') {
|
||||
settingsUpdate.orderBy = 'media.metadata.author'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue