Add album grouping column (#1722)

* Add album grouping column

---------

Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
Norman
2026-02-26 20:34:55 -08:00
committed by GitHub
parent 4918b412b2
commit eb8913479b
18 changed files with 467 additions and 120 deletions
+35 -1
View File
@@ -2239,10 +2239,44 @@ export const useSettingsStore = createWithEqualityFn<SettingsSlice>()(
}
}
if (version <= 26) {
// Add ALBUM_GROUP column to the song table config
const listKeysToUpdate: ItemListKey[] = [
ItemListKey.SONG,
ItemListKey.FOLDER,
ItemListKey.PLAYLIST_SONG,
ItemListKey.ALBUM_ARTIST_SONG,
ItemListKey.GENRE_SONG,
ItemListKey.QUEUE_SONG,
ItemListKey.FULL_SCREEN,
ItemListKey.SIDE_QUEUE,
];
listKeysToUpdate.forEach((listKey) => {
const listConfig = state.lists[listKey as keyof typeof state.lists];
if (listConfig?.table?.columns) {
const columns = listConfig.table.columns;
const hasAlbumGroup = columns.some(
(col) => col.id === TableColumn.ALBUM_GROUP,
);
if (!hasAlbumGroup) {
columns.push({
align: 'start',
autoSize: false,
id: TableColumn.ALBUM_GROUP,
isEnabled: false,
pinned: 'left',
width: 200,
});
}
}
});
}
return persistedState;
},
name: 'store_settings',
version: 25,
version: 26,
},
),
);