New: Manually Edit/Override Album Release (#181)

* New: Manually Edit/Override Album Release

* !fixup for comments, loading all albums instead of only artist albums
* fixup! UI Cleanup lint issues
* fixup! Remove AddAlbum service for now, fix refresh override selected release
* fixup! Last one... to fix updating albums with custom release set

Closes #109 
Closes #129 
Closes #128
This commit is contained in:
Qstick
2018-01-17 21:28:47 -05:00
committed by GitHub
parent 74f433d4f0
commit 26ef43f302
96 changed files with 2928 additions and 408 deletions
@@ -18,8 +18,8 @@
flex: 1 0 125px;
}
.nextAiring,
.previousAiring,
.nextAlbum,
.lastAlbum,
.added {
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
@@ -18,8 +18,8 @@
flex: 1 0 125px;
}
.nextAiring,
.previousAiring,
.nextAlbum,
.lastAlbum,
.added {
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
@@ -32,8 +32,7 @@
flex: 0 0 100px;
}
.trackProgress,
.latestAlbum {
.trackProgress {
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
display: flex;
@@ -12,6 +12,7 @@ import VirtualTableRow from 'Components/Table/VirtualTableRow';
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
import ArtistNameLink from 'Artist/ArtistNameLink';
import AlbumTitleDetailLink from 'Album/AlbumTitleDetailLink';
import EditArtistModalConnector from 'Artist/Edit/EditArtistModalConnector';
import DeleteArtistModal from 'Artist/Delete/DeleteArtistModal';
import ArtistStatusCell from './ArtistStatusCell';
@@ -66,12 +67,13 @@ class ArtistIndexRow extends Component {
status,
artistName,
nameSlug,
foreignArtistId,
artistType,
qualityProfile,
languageProfile,
metadataProfile,
nextAiring,
previousAiring,
nextAlbum,
lastAlbum,
added,
albumCount,
trackCount,
@@ -81,7 +83,6 @@ class ArtistIndexRow extends Component {
path,
sizeOnDisk,
tags,
// useSceneNumbering,
columns,
isRefreshingArtist,
onRefreshArtistPress
@@ -124,7 +125,7 @@ class ArtistIndexRow extends Component {
className={styles[name]}
>
<ArtistNameLink
nameSlug={nameSlug}
foreignArtistId={foreignArtistId}
artistName={artistName}
/>
</VirtualTableRowCell>
@@ -175,25 +176,51 @@ class ArtistIndexRow extends Component {
);
}
if (name === 'nextAiring') {
if (name === 'nextAlbum') {
if (nextAlbum) {
return (
<VirtualTableRowCell
key={name}
className={styles[name]}
>
<AlbumTitleDetailLink
title={nextAlbum.title}
foreignAlbumId={nextAlbum.foreignAlbumId}
/>
</VirtualTableRowCell>
);
}
return (
<RelativeDateCellConnector
<VirtualTableRowCell
key={name}
className={styles[name]}
date={nextAiring}
component={VirtualTableRowCell}
/>
>
None
</VirtualTableRowCell>
);
}
if (name === 'previousAiring') {
if (name === 'lastAlbum') {
if (lastAlbum) {
return (
<VirtualTableRowCell
key={name}
className={styles[name]}
>
<AlbumTitleDetailLink
title={lastAlbum.title}
foreignAlbumId={lastAlbum.foreignAlbumId}
/>
</VirtualTableRowCell>
);
}
return (
<RelativeDateCellConnector
<VirtualTableRowCell
key={name}
className={styles[name]}
date={previousAiring}
component={VirtualTableRowCell}
/>
>
None
</VirtualTableRowCell>
);
}
@@ -239,27 +266,6 @@ class ArtistIndexRow extends Component {
);
}
if (name === 'latestAlbum') {
const albumStatistics = latestAlbum.statistics;
const progress = albumStatistics.trackCount ? albumStatistics.trackFileCount / albumStatistics.trackCount * 100 : 100;
return (
<VirtualTableRowCell
key={name}
className={styles[name]}
>
<ProgressBar
progress={progress}
kind={getProgressBarKind(status, monitored, progress)}
showText={true}
text={`${albumStatistics.trackFileCount} / ${albumStatistics.trackCount}`}
title={`${albumStatistics.trackFileCount} / ${albumStatistics.trackCount} (Total: ${albumStatistics.totalTrackCount})`}
width={125}
/>
</VirtualTableRowCell>
);
}
if (name === 'trackCount') {
return (
<VirtualTableRowCell
@@ -356,14 +362,15 @@ ArtistIndexRow.propTypes = {
status: PropTypes.string.isRequired,
artistName: PropTypes.string.isRequired,
nameSlug: PropTypes.string.isRequired,
foreignArtistId: PropTypes.string.isRequired,
artistType: PropTypes.string,
qualityProfile: PropTypes.object.isRequired,
languageProfile: PropTypes.object.isRequired,
metadataProfile: PropTypes.object.isRequired,
nextAiring: PropTypes.string,
previousAiring: PropTypes.string,
nextAlbum: PropTypes.object,
lastAlbum: PropTypes.object,
added: PropTypes.string,
albumCount: PropTypes.number.isRequired,
albumCount: PropTypes.number,
trackCount: PropTypes.number,
trackFileCount: PropTypes.number,
totalTrackCount: PropTypes.number,
@@ -23,6 +23,7 @@ export default function artistIndexCellRenderers(cellProps) {
status,
name,
nameSlug,
foreignArtistId,
qualityProfileId,
nextAiring,
previousAiring,
@@ -52,7 +53,7 @@ export default function artistIndexCellRenderers(cellProps) {
{...otherProps}
>
<ArtistNameLink
nameSlug={nameSlug}
foreignArtistId={foreignArtistId}
name={name}
/>
</VirtualTableRowCell>