File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
packages/app/app/components/AlbumView Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,28 @@ export const AlbumView: React.FC<AlbumViewProps> = ({
4141 const displayPlaylistCreationDialog = ( ) => setIsCreatePlaylistDialogOpen ( true ) ;
4242 const hidePlaylistCreationDialog = ( ) => setIsCreatePlaylistDialogOpen ( false ) ;
4343
44+ const displayArtistColumn = ( ) => {
45+ if ( ! album . artist || ! album . tracklist ) {
46+ return false ;
47+ }
48+
49+ for ( const track of album . tracklist ) {
50+ if ( ! track . artists ) {
51+ return false ;
52+ }
53+
54+ if ( track . artists . length > 1 ) {
55+ return true ;
56+ }
57+
58+ if ( album . artist !== track . artists ?. [ 0 ] ) {
59+ return true ;
60+ }
61+ }
62+
63+ return false ;
64+ } ;
65+
4466 const release_date : Date = new Date ( album . year ) ;
4567 return < div className = { styles . album_view_container } >
4668 < Dimmer . Dimmable >
@@ -178,7 +200,7 @@ export const AlbumView: React.FC<AlbumViewProps> = ({
178200 tracks = { album . tracklist }
179201 displayDeleteButton = { false }
180202 displayThumbnail = { false }
181- displayArtist = { false }
203+ displayArtist = { displayArtistColumn ( ) }
182204 displayAlbum = { false }
183205 />
184206 </ div >
You can’t perform that action at this time.
0 commit comments