mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-23 10:56:28 +02:00
fix tag editor defaults to set sort tags to non-multi
This commit is contained in:
@@ -2052,7 +2052,7 @@ const initialState: SettingsState = {
|
|||||||
ALBUMARTISTSSORT: {
|
ALBUMARTISTSSORT: {
|
||||||
autocompleteSource: 'serverArtists',
|
autocompleteSource: 'serverArtists',
|
||||||
customValues: [],
|
customValues: [],
|
||||||
multiValue: true,
|
multiValue: false,
|
||||||
},
|
},
|
||||||
artist: {
|
artist: {
|
||||||
autocompleteSource: 'serverArtists',
|
autocompleteSource: 'serverArtists',
|
||||||
@@ -2067,12 +2067,12 @@ const initialState: SettingsState = {
|
|||||||
artistSort: {
|
artistSort: {
|
||||||
autocompleteSource: 'serverArtists',
|
autocompleteSource: 'serverArtists',
|
||||||
customValues: [],
|
customValues: [],
|
||||||
multiValue: true,
|
multiValue: false,
|
||||||
},
|
},
|
||||||
ARTISTSSORT: {
|
ARTISTSSORT: {
|
||||||
autocompleteSource: 'serverArtists',
|
autocompleteSource: 'serverArtists',
|
||||||
customValues: [],
|
customValues: [],
|
||||||
multiValue: true,
|
multiValue: false,
|
||||||
},
|
},
|
||||||
genre: {
|
genre: {
|
||||||
autocompleteSource: 'serverGenres',
|
autocompleteSource: 'serverGenres',
|
||||||
@@ -2705,10 +2705,26 @@ export const useSettingsStore = createWithEqualityFn<SettingsSlice>()(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (version < 32) {
|
||||||
|
const tagConfigs = state.tagEditor?.tagConfigs;
|
||||||
|
if (tagConfigs) {
|
||||||
|
for (const key of [
|
||||||
|
'albumArtistSort',
|
||||||
|
'ALBUMARTISTSSORT',
|
||||||
|
'artistSort',
|
||||||
|
'ARTISTSSORT',
|
||||||
|
] as const) {
|
||||||
|
if (tagConfigs[key]) {
|
||||||
|
tagConfigs[key].multiValue = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return persistedState;
|
return persistedState;
|
||||||
},
|
},
|
||||||
name: 'store_settings',
|
name: 'store_settings',
|
||||||
version: 31,
|
version: 32,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user