Add additional information to album: record label, release type, version (#1242)

* Add additional information to album

* add mbz release types and normalization

* update Pill styling

---------

Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
Kendall Garner 2025-11-03 08:34:42 +00:00 committed by GitHub
parent 3fe6ccf300
commit e26ffaac53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 223 additions and 40 deletions

View file

@ -9,6 +9,7 @@ import { AppRoute } from '/@/renderer/router/routes';
import { formatDurationString, formatSizeString } from '/@/renderer/utils';
import { formatDateRelative, formatRating } from '/@/renderer/utils/format';
import { replaceURLWithHTMLLinks } from '/@/renderer/utils/linkify';
import { normalizeReleaseTypes } from '/@/renderer/utils/normalize-release-types';
import { sanitize } from '/@/renderer/utils/sanitize';
import { SEPARATOR_STRING } from '/@/shared/api/utils';
import { Icon } from '/@/shared/components/icon/icon';
@ -122,6 +123,10 @@ const BoolField = (key: boolean) =>
const AlbumPropertyMapping: ItemDetailRow<Album>[] = [
{ key: 'name', label: 'common.title' },
{ label: 'entity.albumArtist_one', render: (item) => formatArtists(item.albumArtists) },
{
label: 'common.releaseType',
render: (item, t) => normalizeReleaseTypes(item.releaseTypes, t).join(SEPARATOR_STRING),
},
{ label: 'entity.genre_other', render: FormatGenre },
{
label: 'common.duration',
@ -174,6 +179,8 @@ const AlbumPropertyMapping: ItemDetailRow<Album>[] = [
) : null,
},
{ key: 'id', label: 'filter.id' },
{ key: 'version', label: 'common.version' },
{ label: 'common.recordLabel', render: (item) => item.recordLabels.join(SEPARATOR_STRING) },
];
const AlbumArtistPropertyMapping: ItemDetailRow<AlbumArtist>[] = [