mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Added album disambiguation to UI and Naming [ex. Weezer (Blue Album)] (#431)
This commit is contained in:
parent
54d1d90e16
commit
e6a43b2dc0
19 changed files with 73 additions and 39 deletions
|
@ -114,6 +114,7 @@ class HistoryRow extends Component {
|
|||
<AlbumTitleLink
|
||||
foreignAlbumId={album.foreignAlbumId}
|
||||
title={album.title}
|
||||
disambiguation={album.disambiguation}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
|
|
|
@ -158,6 +158,7 @@ class QueueRow extends Component {
|
|||
<AlbumTitleLink
|
||||
foreignAlbumId={album.foreignAlbumId}
|
||||
title={album.title}
|
||||
disambiguation={album.disambiguation}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
|
|
|
@ -2,19 +2,20 @@ import PropTypes from 'prop-types';
|
|||
import React from 'react';
|
||||
import Link from 'Components/Link/Link';
|
||||
|
||||
function AlbumTitleLink({ foreignAlbumId, title }) {
|
||||
function AlbumTitleLink({ foreignAlbumId, title, disambiguation }) {
|
||||
const link = `/album/${foreignAlbumId}`;
|
||||
|
||||
return (
|
||||
<Link to={link}>
|
||||
{title}
|
||||
{title}{disambiguation ? ` (${disambiguation})` : ''}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
AlbumTitleLink.propTypes = {
|
||||
foreignAlbumId: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired
|
||||
title: PropTypes.string.isRequired,
|
||||
disambiguation: PropTypes.string
|
||||
};
|
||||
|
||||
export default AlbumTitleLink;
|
||||
|
|
|
@ -136,6 +136,7 @@ class AlbumDetails extends Component {
|
|||
const {
|
||||
id,
|
||||
title,
|
||||
disambiguation,
|
||||
albumType,
|
||||
statistics,
|
||||
monitored,
|
||||
|
@ -251,7 +252,7 @@ class AlbumDetails extends Component {
|
|||
<div className={styles.info}>
|
||||
<div className={styles.titleContainer}>
|
||||
<div className={styles.title}>
|
||||
{title}
|
||||
{title}{disambiguation ? ` (${disambiguation})` : ''}
|
||||
</div>
|
||||
|
||||
<div className={styles.artistNavigationButtons}>
|
||||
|
@ -444,6 +445,7 @@ AlbumDetails.propTypes = {
|
|||
id: PropTypes.number.isRequired,
|
||||
foreignAlbumId: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
disambiguation: PropTypes.string,
|
||||
albumType: PropTypes.string.isRequired,
|
||||
statistics: PropTypes.object.isRequired,
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
|
|
|
@ -76,6 +76,7 @@ class AlbumRow extends Component {
|
|||
secondaryTypes,
|
||||
title,
|
||||
ratings,
|
||||
disambiguation,
|
||||
isSaving,
|
||||
artistMonitored,
|
||||
foreignAlbumId,
|
||||
|
@ -124,8 +125,9 @@ class AlbumRow extends Component {
|
|||
className={styles.title}
|
||||
>
|
||||
<AlbumTitleLink
|
||||
title={title}
|
||||
foreignAlbumId={foreignAlbumId}
|
||||
title={title}
|
||||
disambiguation={disambiguation}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
|
@ -239,6 +241,7 @@ AlbumRow.propTypes = {
|
|||
duration: PropTypes.number.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
ratings: PropTypes.object.isRequired,
|
||||
disambiguation: PropTypes.string,
|
||||
secondaryTypes: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||
foreignAlbumId: PropTypes.string.isRequired,
|
||||
isSaving: PropTypes.bool,
|
||||
|
|
|
@ -187,6 +187,7 @@ class ArtistIndexRow extends Component {
|
|||
>
|
||||
<AlbumTitleLink
|
||||
title={nextAlbum.title}
|
||||
disambiguation={nextAlbum.disambiguation}
|
||||
foreignAlbumId={nextAlbum.foreignAlbumId}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
|
@ -211,6 +212,7 @@ class ArtistIndexRow extends Component {
|
|||
>
|
||||
<AlbumTitleLink
|
||||
title={lastAlbum.title}
|
||||
disambiguation={lastAlbum.disambiguation}
|
||||
foreignAlbumId={lastAlbum.foreignAlbumId}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
|
|
|
@ -134,7 +134,9 @@ class NamingModal extends Component {
|
|||
|
||||
{ token: '{Album CleanTitle}', example: 'Album Title' },
|
||||
|
||||
{ token: '{Album Type}', example: 'Album Type' }
|
||||
{ token: '{Album Type}', example: 'Album Type' },
|
||||
|
||||
{ token: '{Album Disambiguation}', example: 'Disambiguation' }
|
||||
];
|
||||
|
||||
const mediumTokens = [
|
||||
|
|
|
@ -21,6 +21,7 @@ function CutoffUnmetRow(props) {
|
|||
foreignAlbumId,
|
||||
albumType,
|
||||
title,
|
||||
disambiguation,
|
||||
isSelected,
|
||||
columns,
|
||||
onSelectedChange
|
||||
|
@ -62,6 +63,7 @@ function CutoffUnmetRow(props) {
|
|||
<AlbumTitleLink
|
||||
foreignAlbumId={foreignAlbumId}
|
||||
title={title}
|
||||
disambiguation={disambiguation}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
|
@ -140,6 +142,7 @@ CutoffUnmetRow.propTypes = {
|
|||
foreignAlbumId: PropTypes.string.isRequired,
|
||||
albumType: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
disambiguation: PropTypes.string,
|
||||
isSelected: PropTypes.bool,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
onSelectedChange: PropTypes.func.isRequired
|
||||
|
|
|
@ -20,6 +20,7 @@ function MissingRow(props) {
|
|||
albumType,
|
||||
foreignAlbumId,
|
||||
title,
|
||||
disambiguation,
|
||||
isSelected,
|
||||
columns,
|
||||
onSelectedChange
|
||||
|
@ -55,30 +56,13 @@ function MissingRow(props) {
|
|||
);
|
||||
}
|
||||
|
||||
// if (name === 'episode') {
|
||||
// return (
|
||||
// <TableRowCell
|
||||
// key={name}
|
||||
// className={styles.episode}
|
||||
// >
|
||||
// <SeasonEpisodeNumber
|
||||
// seasonNumber={seasonNumber}
|
||||
// episodeNumber={episodeNumber}
|
||||
// absoluteEpisodeNumber={absoluteEpisodeNumber}
|
||||
// sceneSeasonNumber={sceneSeasonNumber}
|
||||
// sceneEpisodeNumber={sceneEpisodeNumber}
|
||||
// sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
|
||||
// />
|
||||
// </TableRowCell>
|
||||
// );
|
||||
// }
|
||||
|
||||
if (name === 'albumTitle') {
|
||||
return (
|
||||
<TableRowCell key={name}>
|
||||
<AlbumTitleLink
|
||||
foreignAlbumId={foreignAlbumId}
|
||||
title={title}
|
||||
disambiguation={disambiguation}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
|
@ -101,21 +85,6 @@ function MissingRow(props) {
|
|||
);
|
||||
}
|
||||
|
||||
// if (name === 'status') {
|
||||
// return (
|
||||
// <TableRowCell
|
||||
// key={name}
|
||||
// className={styles.status}
|
||||
// >
|
||||
// <EpisodeStatusConnector
|
||||
// albumId={id}
|
||||
// trackFileId={trackFileId}
|
||||
// albumEntity={albumEntities.WANTED_MISSING}
|
||||
// />
|
||||
// </TableRowCell>
|
||||
// );
|
||||
// }
|
||||
|
||||
if (name === 'actions') {
|
||||
return (
|
||||
<AlbumSearchCellConnector
|
||||
|
@ -144,6 +113,7 @@ MissingRow.propTypes = {
|
|||
foreignAlbumId: PropTypes.string.isRequired,
|
||||
albumType: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
disambiguation: PropTypes.string,
|
||||
isSelected: PropTypes.bool,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
onSelectedChange: PropTypes.func.isRequired
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue