Skip to content

Commit

Permalink
Displaying artist in music service items where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalopitz committed Nov 25, 2016
1 parent 1ac6751 commit 8f7c8ce
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ui/components/BrowserListItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,17 @@ class BrowserListItem extends React.Component {
}
}

if(item.creator) {
let creator = item.creator || item.artist || _.get(item, 'trackMetadata.artist');
let albumArtURI = item.albumArtURI || _.get(item, 'trackMetadata.albumArtURI');

if(creator) {
className += ' with-creator';

artistInfo = (
<p className="creator" title={item.creator}>{item.creator}</p>
<p className="creator" title={creator}>{creator}</p>
);
}

let albumArtURI = (item.trackMetadata && item.trackMetadata.albumArtURI) ? item.trackMetadata.albumArtURI : item.albumArtURI;

return (
<li onClick={this._onClick.bind(this)}
Expand Down

0 comments on commit 8f7c8ce

Please sign in to comment.