mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Add Support for Artist Links from Metadata
This commit is contained in:
parent
06a2f65fd9
commit
d2bafd4605
11 changed files with 169 additions and 74 deletions
|
@ -159,6 +159,7 @@ class ArtistDetails extends Component {
|
|||
monitored,
|
||||
status,
|
||||
overview,
|
||||
links,
|
||||
images,
|
||||
albums,
|
||||
alternateTitles,
|
||||
|
@ -416,6 +417,7 @@ class ArtistDetails extends Component {
|
|||
tooltip={
|
||||
<ArtistDetailsLinks
|
||||
foreignArtistId={foreignArtistId}
|
||||
links={links}
|
||||
/>
|
||||
}
|
||||
kind={kinds.INVERSE}
|
||||
|
@ -541,6 +543,7 @@ ArtistDetails.propTypes = {
|
|||
monitored: PropTypes.bool.isRequired,
|
||||
status: PropTypes.string.isRequired,
|
||||
overview: PropTypes.string.isRequired,
|
||||
links: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
images: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
albums: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
alternateTitles: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||
|
|
|
@ -7,11 +7,13 @@ import styles from './ArtistDetailsLinks.css';
|
|||
|
||||
function ArtistDetailsLinks(props) {
|
||||
const {
|
||||
foreignArtistId
|
||||
foreignArtistId,
|
||||
links
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<div className={styles.links}>
|
||||
|
||||
<Link
|
||||
className={styles.link}
|
||||
to={`https://musicbrainz.org/artist/${foreignArtistId}`}
|
||||
|
@ -25,12 +27,37 @@ function ArtistDetailsLinks(props) {
|
|||
</Label>
|
||||
</Link>
|
||||
|
||||
{links.map((link, index) => {
|
||||
return (
|
||||
<span key={index}>
|
||||
<Link className={styles.link}
|
||||
to={link.url}
|
||||
key={index}
|
||||
>
|
||||
<Label
|
||||
className={styles.linkLabel}
|
||||
kind={kinds.INFO}
|
||||
size={sizes.LARGE}
|
||||
>
|
||||
{link.name}
|
||||
</Label>
|
||||
</Link>
|
||||
{(index > 0 && index % 5 === 0) &&
|
||||
<br></br>
|
||||
}
|
||||
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
ArtistDetailsLinks.propTypes = {
|
||||
foreignArtistId: PropTypes.string.isRequired
|
||||
foreignArtistId: PropTypes.string.isRequired,
|
||||
links: PropTypes.arrayOf(PropTypes.object).isRequired
|
||||
};
|
||||
|
||||
export default ArtistDetailsLinks;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue