mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-10 15:23:40 -07:00
Support for Artist Disambiguation and Type
This commit is contained in:
parent
6e4638f7b1
commit
ed3b47d76a
19 changed files with 95 additions and 92 deletions
|
@ -48,7 +48,8 @@ class AddNewArtistSearchResult extends Component {
|
|||
artistName,
|
||||
nameSlug,
|
||||
year,
|
||||
network,
|
||||
disambiguation,
|
||||
artistType,
|
||||
status,
|
||||
overview,
|
||||
albumCount,
|
||||
|
@ -59,10 +60,10 @@ class AddNewArtistSearchResult extends Component {
|
|||
} = this.props;
|
||||
|
||||
const linkProps = isExistingArtist ? { to: `/artist/${nameSlug}` } : { onPress: this.onPress };
|
||||
let seasons = '1 Season';
|
||||
let albums = '1 Album';
|
||||
|
||||
if (albumCount > 1) {
|
||||
seasons = `${albumCount} Seasons`;
|
||||
albums = `${albumCount} Albums`;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -88,6 +89,11 @@ class AddNewArtistSearchResult extends Component {
|
|||
<span className={styles.year}>({year})</span>
|
||||
}
|
||||
|
||||
{
|
||||
!!disambiguation &&
|
||||
<span className={styles.year}>({disambiguation})</span>
|
||||
}
|
||||
|
||||
{
|
||||
isExistingArtist &&
|
||||
<Icon
|
||||
|
@ -108,16 +114,16 @@ class AddNewArtistSearchResult extends Component {
|
|||
</Label>
|
||||
|
||||
{
|
||||
!!network &&
|
||||
!!artistType &&
|
||||
<Label size={sizes.LARGE}>
|
||||
{network}
|
||||
{artistType}
|
||||
</Label>
|
||||
}
|
||||
|
||||
{
|
||||
!!albumCount &&
|
||||
<Label size={sizes.LARGE}>
|
||||
{seasons}
|
||||
{albums}
|
||||
</Label>
|
||||
}
|
||||
|
||||
|
@ -156,7 +162,8 @@ AddNewArtistSearchResult.propTypes = {
|
|||
artistName: PropTypes.string.isRequired,
|
||||
nameSlug: PropTypes.string.isRequired,
|
||||
year: PropTypes.number,
|
||||
network: PropTypes.string,
|
||||
disambiguation: PropTypes.string,
|
||||
artistType: PropTypes.string,
|
||||
status: PropTypes.string.isRequired,
|
||||
overview: PropTypes.string,
|
||||
albumCount: PropTypes.number,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.overview {
|
||||
.disambiguation {
|
||||
margin-right: 5px;
|
||||
color: $disabledColor;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import styles from './ImportArtistName.css';
|
|||
function ImportArtistName(props) {
|
||||
const {
|
||||
artistName,
|
||||
disambiguation,
|
||||
// year,
|
||||
isExistingArtist
|
||||
} = props;
|
||||
|
@ -16,6 +17,9 @@ function ImportArtistName(props) {
|
|||
<div className={styles.artistName}>
|
||||
{artistName}
|
||||
</div>
|
||||
<div className={styles.disambiguation}>
|
||||
{disambiguation}
|
||||
</div>
|
||||
|
||||
{
|
||||
isExistingArtist &&
|
||||
|
@ -31,6 +35,7 @@ function ImportArtistName(props) {
|
|||
|
||||
ImportArtistName.propTypes = {
|
||||
artistName: PropTypes.string.isRequired,
|
||||
disambiguation: PropTypes.string,
|
||||
// year: PropTypes.number.isRequired,
|
||||
isExistingArtist: PropTypes.bool.isRequired
|
||||
};
|
||||
|
|
|
@ -19,7 +19,7 @@ class ImportArtistSearchResult extends Component {
|
|||
render() {
|
||||
const {
|
||||
artistName,
|
||||
// overview,
|
||||
disambiguation,
|
||||
// year,
|
||||
isExistingArtist
|
||||
} = this.props;
|
||||
|
@ -31,7 +31,7 @@ class ImportArtistSearchResult extends Component {
|
|||
>
|
||||
<ImportArtistName
|
||||
artistName={artistName}
|
||||
// overview={overview}
|
||||
disambiguation={disambiguation}
|
||||
// year={year}
|
||||
isExistingArtist={isExistingArtist}
|
||||
/>
|
||||
|
@ -43,7 +43,7 @@ class ImportArtistSearchResult extends Component {
|
|||
ImportArtistSearchResult.propTypes = {
|
||||
foreignArtistId: PropTypes.string.isRequired,
|
||||
artistName: PropTypes.string.isRequired,
|
||||
// overview: PropTypes.string.isRequired,
|
||||
disambiguation: PropTypes.string,
|
||||
// year: PropTypes.number.isRequired,
|
||||
isExistingArtist: PropTypes.bool.isRequired,
|
||||
onPress: PropTypes.func.isRequired
|
||||
|
|
|
@ -158,7 +158,7 @@ class ImportArtistSelectArtist extends Component {
|
|||
isPopulated && selectedArtist &&
|
||||
<ImportArtistName
|
||||
artistName={selectedArtist.artistName}
|
||||
overview={selectedArtist.overview}
|
||||
disambiguation={selectedArtist.disambiguation}
|
||||
// year={selectedArtist.year}
|
||||
isExistingArtist={isExistingArtist}
|
||||
/>
|
||||
|
@ -229,7 +229,7 @@ class ImportArtistSelectArtist extends Component {
|
|||
key={item.foreignArtistId}
|
||||
foreignArtistId={item.foreignArtistId}
|
||||
artistName={item.artistName}
|
||||
// overview={item.overview}
|
||||
disambiguation={item.disambiguation}
|
||||
// year={item.year}
|
||||
onPress={this.onArtistSelect}
|
||||
/>
|
||||
|
|
|
@ -24,6 +24,15 @@ function ArtistIndexSortMenu(props) {
|
|||
Name
|
||||
</SortMenuItem>
|
||||
|
||||
<SortMenuItem
|
||||
name="artistType"
|
||||
sortKey={sortKey}
|
||||
sortDirection={sortDirection}
|
||||
onPress={onSortSelect}
|
||||
>
|
||||
Type
|
||||
</SortMenuItem>
|
||||
|
||||
<SortMenuItem
|
||||
name="qualityProfileId"
|
||||
sortKey={sortKey}
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
flex: 0 0 150px;
|
||||
}
|
||||
|
||||
.artistType,
|
||||
.trackCount {
|
||||
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
flex-direction: column;
|
||||
}
|
||||
|
||||
.artistType,
|
||||
.trackCount {
|
||||
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ class ArtistIndexRow extends Component {
|
|||
status,
|
||||
artistName,
|
||||
nameSlug,
|
||||
artistType,
|
||||
qualityProfile,
|
||||
languageProfile,
|
||||
nextAiring,
|
||||
|
@ -129,6 +130,17 @@ class ArtistIndexRow extends Component {
|
|||
);
|
||||
}
|
||||
|
||||
if (name === 'artistType') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={name}
|
||||
className={styles[name]}
|
||||
>
|
||||
{artistType}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'qualityProfileId') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
|
@ -282,23 +294,6 @@ class ArtistIndexRow extends Component {
|
|||
);
|
||||
}
|
||||
|
||||
// if (name === 'useSceneNumbering') {
|
||||
// return (
|
||||
// <VirtualTableRowCell
|
||||
// key={name}
|
||||
// className={styles[name]}
|
||||
// >
|
||||
// <CheckInput
|
||||
// className={styles.checkInput}
|
||||
// name="useSceneNumbering"
|
||||
// value={useSceneNumbering}
|
||||
// isDisabled={true}
|
||||
// onChange={this.onUseSceneNumberingChange}
|
||||
// />
|
||||
// </VirtualTableRowCell>
|
||||
// );
|
||||
// }
|
||||
|
||||
if (name === 'actions') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
|
@ -349,6 +344,7 @@ ArtistIndexRow.propTypes = {
|
|||
status: PropTypes.string.isRequired,
|
||||
artistName: PropTypes.string.isRequired,
|
||||
nameSlug: PropTypes.string.isRequired,
|
||||
artistType: PropTypes.string,
|
||||
qualityProfile: PropTypes.object.isRequired,
|
||||
languageProfile: PropTypes.object.isRequired,
|
||||
nextAiring: PropTypes.string,
|
||||
|
|
|
@ -45,6 +45,13 @@ export const defaultState = {
|
|||
isVisible: true,
|
||||
isModifiable: false
|
||||
},
|
||||
{
|
||||
name: 'artistType',
|
||||
label: 'Type',
|
||||
isSortable: true,
|
||||
isVisible: true,
|
||||
isModifiable: false
|
||||
},
|
||||
{
|
||||
name: 'qualityProfileId',
|
||||
label: 'Quality Profile',
|
||||
|
|
|
@ -6,7 +6,7 @@ function getNewSeries(series, payload) {
|
|||
monitor,
|
||||
qualityProfileId,
|
||||
languageProfileId,
|
||||
// seriesType,
|
||||
artistType,
|
||||
albumFolder,
|
||||
tags,
|
||||
searchForMissingAlbums = false
|
||||
|
@ -24,7 +24,7 @@ function getNewSeries(series, payload) {
|
|||
series.qualityProfileId = qualityProfileId;
|
||||
series.languageProfileId = languageProfileId;
|
||||
series.rootFolderPath = rootFolderPath;
|
||||
// series.seriesType = seriesType;
|
||||
series.artistType = artistType;
|
||||
series.albumFolder = albumFolder;
|
||||
series.tags = tags;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue