Skip to content

🎧 Your Personal Streaming Service

feat(ui): add composer field to table views (#4857)

Alex Gustafsson8e96dd078442
diff --git a/resources/i18n/sv.json b/resources/i18n/sv.json
index 30bf89ec4..a93831079 100644
--- a/resources/i18n/sv.json
+++ b/resources/i18n/sv.json
@@ -10,6 +10,7 @@
"playCount": "Spelningar",
"title": "Titel",
"artist": "Artist",
+ "composer": "Kompositör",
"album": "Album",
"path": "Sökväg",
"genre": "Genre",
diff --git a/ui/src/album/AlbumSongs.jsx b/ui/src/album/AlbumSongs.jsx
index d705617e1..8a7fd2ae4 100644
--- a/ui/src/album/AlbumSongs.jsx
+++ b/ui/src/album/AlbumSongs.jsx
@@ -108,6 +108,9 @@ const AlbumSongs = (props) => {
/>
),
artist: isDesktop && <ArtistLinkField source="artist" sortable={false} />,
+ composer: isDesktop && (
+ <ArtistLinkField source="composer" sortable={false} />
+ ),
duration: <DurationField source="duration" sortable={false} />,
year: isDesktop && (
<FunctionField
@@ -148,6 +151,7 @@ const AlbumSongs = (props) => {
columns: toggleableFields,
omittedColumns: ['title'],
defaultOff: [
+ 'composer',
'channels',
'bpm',
'year',
diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json
index 2a04b8127..600fa74af 100644
--- a/ui/src/i18n/en.json
+++ b/ui/src/i18n/en.json
@@ -10,6 +10,7 @@
"playCount": "Plays",
"title": "Title",
"artist": "Artist",
+ "composer": "Composer",
"album": "Album",
"path": "File path",
"libraryName": "Library",
diff --git a/ui/src/song/SongList.jsx b/ui/src/song/SongList.jsx
index f067e11d2..98684132f 100644
--- a/ui/src/song/SongList.jsx
+++ b/ui/src/song/SongList.jsx
@@ -145,6 +145,7 @@ const SongList = (props) => {
return {
album: isDesktop && <AlbumLinkField source="album" sortByOrder={'ASC'} />,
artist: <ArtistLinkField source="artist" />,
+ composer: <ArtistLinkField source="composer" />,
albumArtist: <ArtistLinkField source="albumArtist" />,
trackNumber: isDesktop && <NumberField source="trackNumber" />,
playCount: isDesktop && (
@@ -192,6 +193,7 @@ const SongList = (props) => {
resource: 'song',
columns: toggleableFields,
defaultOff: [
+ 'composer',
'channels',
'bpm',
'playDate',