mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Fixed: show disambiguation in interactive import modal (#576)
This commit is contained in:
parent
ef9072fc3b
commit
c749405a45
2 changed files with 9 additions and 2 deletions
|
@ -34,6 +34,7 @@ class SelectAlbumRow extends Component {
|
|||
render() {
|
||||
const {
|
||||
title,
|
||||
disambiguation,
|
||||
albumType,
|
||||
releaseDate,
|
||||
statistics,
|
||||
|
@ -47,6 +48,8 @@ class SelectAlbumRow extends Component {
|
|||
totalTrackCount
|
||||
} = statistics;
|
||||
|
||||
const extendedTitle = disambiguation ? `${title} (${disambiguation})` : title;
|
||||
|
||||
return (
|
||||
<TableRow
|
||||
onClick={this.onPress}
|
||||
|
@ -66,7 +69,7 @@ class SelectAlbumRow extends Component {
|
|||
if (name === 'title') {
|
||||
return (
|
||||
<TableRowCell key={name}>
|
||||
{title}
|
||||
{extendedTitle}
|
||||
</TableRowCell>
|
||||
);
|
||||
}
|
||||
|
@ -118,6 +121,7 @@ class SelectAlbumRow extends Component {
|
|||
SelectAlbumRow.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
disambiguation: PropTypes.string.isRequired,
|
||||
albumType: PropTypes.string.isRequired,
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
onAlbumSelect: PropTypes.func.isRequired,
|
||||
|
|
|
@ -185,7 +185,10 @@ class InteractiveImportRow extends Component {
|
|||
} = this.state;
|
||||
|
||||
const artistName = artist ? artist.artistName : '';
|
||||
const albumTitle = album ? album.title : '';
|
||||
let albumTitle = '';
|
||||
if (album) {
|
||||
albumTitle = album.disambiguation ? `${album.title} (${album.disambiguation})` : album.title;
|
||||
}
|
||||
const trackNumbers = tracks.map((track) => `${track.mediumNumber}x${track.trackNumber}`)
|
||||
.join(', ');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue