mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fixed: Last UI reference to nameSlug, remove from model
This commit is contained in:
parent
afc4aeb25f
commit
b0070e0229
17 changed files with 6 additions and 279 deletions
|
@ -66,7 +66,6 @@ class AddNewArtistSearchResult extends Component {
|
|||
const {
|
||||
foreignArtistId,
|
||||
artistName,
|
||||
nameSlug,
|
||||
year,
|
||||
disambiguation,
|
||||
artistType,
|
||||
|
@ -79,7 +78,7 @@ class AddNewArtistSearchResult extends Component {
|
|||
isSmallScreen
|
||||
} = this.props;
|
||||
|
||||
const linkProps = isExistingArtist ? { to: `/artist/${nameSlug}` } : { onPress: this.onPress };
|
||||
const linkProps = isExistingArtist ? { to: `/artist/${foreignArtistId}` } : { onPress: this.onPress };
|
||||
let albums = '1 Album';
|
||||
|
||||
if (albumCount > 1) {
|
||||
|
@ -193,7 +192,6 @@ class AddNewArtistSearchResult extends Component {
|
|||
AddNewArtistSearchResult.propTypes = {
|
||||
foreignArtistId: PropTypes.string.isRequired,
|
||||
artistName: PropTypes.string.isRequired,
|
||||
nameSlug: PropTypes.string.isRequired,
|
||||
year: PropTypes.number,
|
||||
disambiguation: PropTypes.string,
|
||||
artistType: PropTypes.string,
|
||||
|
|
|
@ -19,7 +19,6 @@ class AlbumStudioRow extends Component {
|
|||
const {
|
||||
artistId,
|
||||
status,
|
||||
nameSlug,
|
||||
foreignArtistId,
|
||||
artistName,
|
||||
monitored,
|
||||
|
@ -84,7 +83,6 @@ class AlbumStudioRow extends Component {
|
|||
AlbumStudioRow.propTypes = {
|
||||
artistId: PropTypes.number.isRequired,
|
||||
status: PropTypes.string.isRequired,
|
||||
nameSlug: PropTypes.string.isRequired,
|
||||
foreignArtistId: PropTypes.string.isRequired,
|
||||
artistName: PropTypes.string.isRequired,
|
||||
monitored: PropTypes.bool.isRequired,
|
||||
|
|
|
@ -20,7 +20,6 @@ function createMapStateToProps() {
|
|||
...artist,
|
||||
artistId: artist.id,
|
||||
artistName: artist.artistName,
|
||||
nameSlug: artist.nameSlug,
|
||||
monitored: artist.monitored,
|
||||
status: artist.status,
|
||||
isSaving: artist.isSaving,
|
||||
|
|
|
@ -66,7 +66,6 @@ class ArtistIndexRow extends Component {
|
|||
monitored,
|
||||
status,
|
||||
artistName,
|
||||
nameSlug,
|
||||
foreignArtistId,
|
||||
artistType,
|
||||
qualityProfile,
|
||||
|
@ -79,7 +78,6 @@ class ArtistIndexRow extends Component {
|
|||
trackCount,
|
||||
trackFileCount,
|
||||
totalTrackCount,
|
||||
latestAlbum,
|
||||
path,
|
||||
sizeOnDisk,
|
||||
tags,
|
||||
|
@ -361,7 +359,6 @@ ArtistIndexRow.propTypes = {
|
|||
monitored: PropTypes.bool.isRequired,
|
||||
status: PropTypes.string.isRequired,
|
||||
artistName: PropTypes.string.isRequired,
|
||||
nameSlug: PropTypes.string.isRequired,
|
||||
foreignArtistId: PropTypes.string.isRequired,
|
||||
artistType: PropTypes.string,
|
||||
qualityProfile: PropTypes.object.isRequired,
|
||||
|
|
|
@ -1,126 +0,0 @@
|
|||
import React from 'react';
|
||||
import getProgressBarKind from 'Utilities/Artist/getProgressBarKind';
|
||||
import ProgressBar from 'Components/ProgressBar';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
|
||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||
import QualityProfileNameConnector from 'Settings/Profiles/Quality/QualityProfileNameConnector';
|
||||
import ArtistNameLink from 'Artist/ArtistNameLink';
|
||||
import ArtistIndexItemConnector from 'Artist/Index/ArtistIndexItemConnector';
|
||||
import ArtistIndexActionsCell from './ArtistIndexActionsCell';
|
||||
import ArtistStatusCell from './ArtistStatusCell';
|
||||
|
||||
export default function artistIndexCellRenderers(cellProps) {
|
||||
const {
|
||||
cellKey,
|
||||
dataKey,
|
||||
rowData,
|
||||
...otherProps
|
||||
} = cellProps;
|
||||
|
||||
const {
|
||||
id,
|
||||
monitored,
|
||||
status,
|
||||
name,
|
||||
nameSlug,
|
||||
foreignArtistId,
|
||||
qualityProfileId,
|
||||
nextAiring,
|
||||
previousAiring,
|
||||
albumCount,
|
||||
trackCount,
|
||||
trackFileCount
|
||||
} = rowData;
|
||||
|
||||
const progress = trackCount ? trackFileCount / trackCount * 100 : 100;
|
||||
|
||||
if (dataKey === 'status') {
|
||||
return (
|
||||
<ArtistStatusCell
|
||||
key={cellKey}
|
||||
monitored={monitored}
|
||||
status={status}
|
||||
component={VirtualTableRowCell}
|
||||
{...otherProps}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'sortName') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={cellKey}
|
||||
{...otherProps}
|
||||
>
|
||||
<ArtistNameLink
|
||||
foreignArtistId={foreignArtistId}
|
||||
name={name}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'qualityProfileId') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={cellKey}
|
||||
{...otherProps}
|
||||
>
|
||||
<QualityProfileNameConnector
|
||||
qualityProfileId={qualityProfileId}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'nextAiring') {
|
||||
return (
|
||||
<RelativeDateCellConnector
|
||||
key={cellKey}
|
||||
date={nextAiring}
|
||||
component={VirtualTableRowCell}
|
||||
{...otherProps}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'albumCount') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={cellKey}
|
||||
{...otherProps}
|
||||
>
|
||||
{albumCount}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'trackProgress') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={cellKey}
|
||||
{...otherProps}
|
||||
>
|
||||
<ProgressBar
|
||||
progress={progress}
|
||||
kind={getProgressBarKind(status, monitored, progress)}
|
||||
showText={true}
|
||||
text={`${trackFileCount} / ${trackCount}`}
|
||||
width={125}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'actions') {
|
||||
return (
|
||||
<ArtistIndexItemConnector
|
||||
key={cellKey}
|
||||
component={ArtistIndexActionsCell}
|
||||
id={id}
|
||||
{...otherProps}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue