From c749405a45659780780e5ecaa9d44952e6d264e2 Mon Sep 17 00:00:00 2001 From: ta264 Date: Thu, 27 Dec 2018 02:39:23 +0000 Subject: [PATCH] Fixed: show disambiguation in interactive import modal (#576) --- frontend/src/InteractiveImport/Album/SelectAlbumRow.js | 6 +++++- .../InteractiveImport/Interactive/InteractiveImportRow.js | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/InteractiveImport/Album/SelectAlbumRow.js b/frontend/src/InteractiveImport/Album/SelectAlbumRow.js index 42e15f05b..d3f69b057 100644 --- a/frontend/src/InteractiveImport/Album/SelectAlbumRow.js +++ b/frontend/src/InteractiveImport/Album/SelectAlbumRow.js @@ -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 ( - {title} + {extendedTitle} ); } @@ -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, diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.js b/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.js index d6c5cdb3e..c40197767 100644 --- a/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.js +++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.js @@ -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(', ');