mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
More UI Cleanup
This commit is contained in:
parent
9c88c2006d
commit
1700c471b7
96 changed files with 267 additions and 333 deletions
|
@ -40,7 +40,7 @@ class BlacklistRow extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
series,
|
artist,
|
||||||
sourceTitle,
|
sourceTitle,
|
||||||
language,
|
language,
|
||||||
quality,
|
quality,
|
||||||
|
@ -64,12 +64,12 @@ class BlacklistRow extends Component {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name === 'series.sortName') {
|
if (name === 'artist.sortName') {
|
||||||
return (
|
return (
|
||||||
<TableRowCell key={name}>
|
<TableRowCell key={name}>
|
||||||
<ArtistNameLink
|
<ArtistNameLink
|
||||||
nameSlug={series.nameSlug}
|
nameSlug={artist.nameSlug}
|
||||||
artistName={series.artistName}
|
artistName={artist.artistName}
|
||||||
/>
|
/>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
);
|
);
|
||||||
|
@ -163,7 +163,7 @@ class BlacklistRow extends Component {
|
||||||
|
|
||||||
BlacklistRow.propTypes = {
|
BlacklistRow.propTypes = {
|
||||||
id: PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
series: PropTypes.object.isRequired,
|
artist: PropTypes.object.isRequired,
|
||||||
sourceTitle: PropTypes.string.isRequired,
|
sourceTitle: PropTypes.string.isRequired,
|
||||||
language: PropTypes.object.isRequired,
|
language: PropTypes.object.isRequired,
|
||||||
quality: PropTypes.object.isRequired,
|
quality: PropTypes.object.isRequired,
|
||||||
|
|
|
@ -6,9 +6,9 @@ import BlacklistRow from './BlacklistRow';
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
(series) => {
|
(artist) => {
|
||||||
return {
|
return {
|
||||||
series
|
artist
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -9,7 +9,7 @@ function getIconName(eventType) {
|
||||||
switch (eventType) {
|
switch (eventType) {
|
||||||
case 'grabbed':
|
case 'grabbed':
|
||||||
return icons.DOWNLOADING;
|
return icons.DOWNLOADING;
|
||||||
case 'seriesFolderImported':
|
case 'artistFolderImported':
|
||||||
return icons.DRIVE;
|
return icons.DRIVE;
|
||||||
case 'downloadFolderImported':
|
case 'downloadFolderImported':
|
||||||
return icons.DOWNLOADED;
|
return icons.DOWNLOADED;
|
||||||
|
@ -37,7 +37,7 @@ function getTooltip(eventType, data) {
|
||||||
switch (eventType) {
|
switch (eventType) {
|
||||||
case 'grabbed':
|
case 'grabbed':
|
||||||
return `Album grabbed from ${data.indexer} and sent to ${data.downloadClient}`;
|
return `Album grabbed from ${data.indexer} and sent to ${data.downloadClient}`;
|
||||||
case 'seriesFolderImported':
|
case 'artistFolderImported':
|
||||||
return 'Track imported from artist folder';
|
return 'Track imported from artist folder';
|
||||||
case 'downloadFolderImported':
|
case 'downloadFolderImported':
|
||||||
return 'Track downloaded successfully and picked up from download client';
|
return 'Track downloaded successfully and picked up from download client';
|
||||||
|
|
|
@ -68,7 +68,7 @@ class QueueRow extends Component {
|
||||||
trackedDownloadStatus,
|
trackedDownloadStatus,
|
||||||
statusMessages,
|
statusMessages,
|
||||||
errorMessage,
|
errorMessage,
|
||||||
series,
|
artist,
|
||||||
episode,
|
episode,
|
||||||
quality,
|
quality,
|
||||||
protocol,
|
protocol,
|
||||||
|
@ -131,23 +131,23 @@ class QueueRow extends Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name === 'series.sortName') {
|
if (name === 'artist.sortName') {
|
||||||
return (
|
return (
|
||||||
<TableRowCell key={name}>
|
<TableRowCell key={name}>
|
||||||
<ArtistNameLink
|
<ArtistNameLink
|
||||||
nameSlug={series.nameSlug}
|
nameSlug={artist.nameSlug}
|
||||||
artistName={series.artistName}
|
artistName={artist.artistName}
|
||||||
/>
|
/>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name === 'series') {
|
if (name === 'artist') {
|
||||||
return (
|
return (
|
||||||
<TableRowCell key={name}>
|
<TableRowCell key={name}>
|
||||||
<ArtistNameLink
|
<ArtistNameLink
|
||||||
nameSlug={series.nameSlug}
|
nameSlug={artist.nameSlug}
|
||||||
artistName={series.artistName}
|
artistName={artist.artistName}
|
||||||
/>
|
/>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
);
|
);
|
||||||
|
@ -158,7 +158,7 @@ class QueueRow extends Component {
|
||||||
<TableRowCell key={name}>
|
<TableRowCell key={name}>
|
||||||
<EpisodeTitleLink
|
<EpisodeTitleLink
|
||||||
albumId={episode.id}
|
albumId={episode.id}
|
||||||
artistId={series.id}
|
artistId={artist.id}
|
||||||
trackFileId={episode.trackFileId}
|
trackFileId={episode.trackFileId}
|
||||||
episodeTitle={episode.title}
|
episodeTitle={episode.title}
|
||||||
showOpenArtistButton={true}
|
showOpenArtistButton={true}
|
||||||
|
@ -300,7 +300,7 @@ QueueRow.propTypes = {
|
||||||
trackedDownloadStatus: PropTypes.string,
|
trackedDownloadStatus: PropTypes.string,
|
||||||
statusMessages: PropTypes.arrayOf(PropTypes.object),
|
statusMessages: PropTypes.arrayOf(PropTypes.object),
|
||||||
errorMessage: PropTypes.string,
|
errorMessage: PropTypes.string,
|
||||||
series: PropTypes.object.isRequired,
|
artist: PropTypes.object.isRequired,
|
||||||
episode: PropTypes.object.isRequired,
|
episode: PropTypes.object.isRequired,
|
||||||
quality: PropTypes.object.isRequired,
|
quality: PropTypes.object.isRequired,
|
||||||
protocol: PropTypes.string.isRequired,
|
protocol: PropTypes.string.isRequired,
|
||||||
|
|
|
@ -14,14 +14,14 @@ function createMapStateToProps() {
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
createEpisodeSelector(),
|
createEpisodeSelector(),
|
||||||
createUISettingsSelector(),
|
createUISettingsSelector(),
|
||||||
(series, episode, uiSettings) => {
|
(artist, episode, uiSettings) => {
|
||||||
const result = _.pick(uiSettings, [
|
const result = _.pick(uiSettings, [
|
||||||
'showRelativeDates',
|
'showRelativeDates',
|
||||||
'shortDateFormat',
|
'shortDateFormat',
|
||||||
'timeFormat'
|
'timeFormat'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
result.series = series;
|
result.artist = artist;
|
||||||
result.episode = episode;
|
result.episode = episode;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -146,7 +146,7 @@ class AddNewArtist extends Component {
|
||||||
<div className={styles.noResults}>Couldn't find any results for '{term}'</div>
|
<div className={styles.noResults}>Couldn't find any results for '{term}'</div>
|
||||||
<div>You can also search using MusicBrainz ID of a show. eg. lidarr:71663</div>
|
<div>You can also search using MusicBrainz ID of a show. eg. lidarr:71663</div>
|
||||||
<div>
|
<div>
|
||||||
<Link to="https://github.com/Sonarr/Sonarr/wiki/FAQ#why-cant-i-add-a-new-series-when-i-know-the-tvdb-id">
|
<Link to="https://github.com/Lidarr/Lidarr/wiki/FAQ#why-cant-i-add-a-new-artist-when-i-know-the-tvdb-id">
|
||||||
Why can't I find my artist?
|
Why can't I find my artist?
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,7 +15,6 @@ import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import Popover from 'Components/Tooltip/Popover';
|
import Popover from 'Components/Tooltip/Popover';
|
||||||
import ArtistPoster from 'Artist/ArtistPoster';
|
import ArtistPoster from 'Artist/ArtistPoster';
|
||||||
import ArtistMonitoringOptionsPopoverContent from 'AddArtist/ArtistMonitoringOptionsPopoverContent';
|
import ArtistMonitoringOptionsPopoverContent from 'AddArtist/ArtistMonitoringOptionsPopoverContent';
|
||||||
// import SeriesTypePopoverContent from 'AddArtist/SeriesTypePopoverContent';
|
|
||||||
import styles from './AddNewArtistModalContent.css';
|
import styles from './AddNewArtistModalContent.css';
|
||||||
|
|
||||||
class AddNewArtistModalContent extends Component {
|
class AddNewArtistModalContent extends Component {
|
||||||
|
|
|
@ -116,7 +116,7 @@ class ImportArtist extends Component {
|
||||||
{
|
{
|
||||||
!rootFoldersError && rootFoldersPopulated && !unmappedFolders.length &&
|
!rootFoldersError && rootFoldersPopulated && !unmappedFolders.length &&
|
||||||
<div>
|
<div>
|
||||||
All series in {path} have been imported
|
All artist in {path} have been imported
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,15 +23,13 @@ class ImportArtistFooter extends Component {
|
||||||
defaultMonitor,
|
defaultMonitor,
|
||||||
defaultQualityProfileId,
|
defaultQualityProfileId,
|
||||||
defaultLanguageProfileId,
|
defaultLanguageProfileId,
|
||||||
defaultAlbumFolder,
|
defaultAlbumFolder
|
||||||
defaultSeriesType
|
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
monitor: defaultMonitor,
|
monitor: defaultMonitor,
|
||||||
qualityProfileId: defaultQualityProfileId,
|
qualityProfileId: defaultQualityProfileId,
|
||||||
languageProfileId: defaultLanguageProfileId,
|
languageProfileId: defaultLanguageProfileId,
|
||||||
seriesType: defaultSeriesType,
|
|
||||||
albumFolder: defaultAlbumFolder
|
albumFolder: defaultAlbumFolder
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -41,12 +39,10 @@ class ImportArtistFooter extends Component {
|
||||||
defaultMonitor,
|
defaultMonitor,
|
||||||
defaultQualityProfileId,
|
defaultQualityProfileId,
|
||||||
defaultLanguageProfileId,
|
defaultLanguageProfileId,
|
||||||
// defaultSeriesType,
|
|
||||||
defaultAlbumFolder,
|
defaultAlbumFolder,
|
||||||
isMonitorMixed,
|
isMonitorMixed,
|
||||||
isQualityProfileIdMixed,
|
isQualityProfileIdMixed,
|
||||||
isLanguageProfileIdMixed,
|
isLanguageProfileIdMixed,
|
||||||
// isSeriesTypeMixed,
|
|
||||||
isAlbumFolderMixed
|
isAlbumFolderMixed
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -54,7 +50,6 @@ class ImportArtistFooter extends Component {
|
||||||
monitor,
|
monitor,
|
||||||
qualityProfileId,
|
qualityProfileId,
|
||||||
languageProfileId,
|
languageProfileId,
|
||||||
// seriesType,
|
|
||||||
albumFolder
|
albumFolder
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
|
@ -108,7 +103,6 @@ class ImportArtistFooter extends Component {
|
||||||
isMonitorMixed,
|
isMonitorMixed,
|
||||||
isQualityProfileIdMixed,
|
isQualityProfileIdMixed,
|
||||||
isLanguageProfileIdMixed,
|
isLanguageProfileIdMixed,
|
||||||
// isSeriesTypeMixed,
|
|
||||||
showLanguageProfile,
|
showLanguageProfile,
|
||||||
onImportPress
|
onImportPress
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
@ -117,7 +111,6 @@ class ImportArtistFooter extends Component {
|
||||||
monitor,
|
monitor,
|
||||||
qualityProfileId,
|
qualityProfileId,
|
||||||
languageProfileId,
|
languageProfileId,
|
||||||
// seriesType,
|
|
||||||
albumFolder
|
albumFolder
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
|
@ -227,12 +220,10 @@ ImportArtistFooter.propTypes = {
|
||||||
defaultMonitor: PropTypes.string.isRequired,
|
defaultMonitor: PropTypes.string.isRequired,
|
||||||
defaultQualityProfileId: PropTypes.number,
|
defaultQualityProfileId: PropTypes.number,
|
||||||
defaultLanguageProfileId: PropTypes.number,
|
defaultLanguageProfileId: PropTypes.number,
|
||||||
defaultSeriesType: PropTypes.string.isRequired,
|
|
||||||
defaultAlbumFolder: PropTypes.bool.isRequired,
|
defaultAlbumFolder: PropTypes.bool.isRequired,
|
||||||
isMonitorMixed: PropTypes.bool.isRequired,
|
isMonitorMixed: PropTypes.bool.isRequired,
|
||||||
isQualityProfileIdMixed: PropTypes.bool.isRequired,
|
isQualityProfileIdMixed: PropTypes.bool.isRequired,
|
||||||
isLanguageProfileIdMixed: PropTypes.bool.isRequired,
|
isLanguageProfileIdMixed: PropTypes.bool.isRequired,
|
||||||
// isSeriesTypeMixed: PropTypes.bool.isRequired,
|
|
||||||
isAlbumFolderMixed: PropTypes.bool.isRequired,
|
isAlbumFolderMixed: PropTypes.bool.isRequired,
|
||||||
showLanguageProfile: PropTypes.bool.isRequired,
|
showLanguageProfile: PropTypes.bool.isRequired,
|
||||||
onInputChange: PropTypes.func.isRequired,
|
onInputChange: PropTypes.func.isRequired,
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { createSelector } from 'reselect';
|
||||||
import ImportArtistFooter from './ImportArtistFooter';
|
import ImportArtistFooter from './ImportArtistFooter';
|
||||||
|
|
||||||
function isMixed(items, selectedIds, defaultValue, key) {
|
function isMixed(items, selectedIds, defaultValue, key) {
|
||||||
return _.some(items, (series) => {
|
return _.some(items, (artist) => {
|
||||||
return selectedIds.indexOf(series.id) > -1 && series[key] !== defaultValue;
|
return selectedIds.indexOf(artist.id) > -1 && artist[key] !== defaultValue;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,20 +19,18 @@ function createMapStateToProps() {
|
||||||
monitor: defaultMonitor,
|
monitor: defaultMonitor,
|
||||||
qualityProfileId: defaultQualityProfileId,
|
qualityProfileId: defaultQualityProfileId,
|
||||||
languageProfileId: defaultLanguageProfileId,
|
languageProfileId: defaultLanguageProfileId,
|
||||||
seriesType: defaultSeriesType,
|
|
||||||
albumFolder: defaultAlbumFolder
|
albumFolder: defaultAlbumFolder
|
||||||
} = addArtist.defaults;
|
} = addArtist.defaults;
|
||||||
|
|
||||||
const items = importArtist.items;
|
const items = importArtist.items;
|
||||||
|
|
||||||
const isLookingUpArtist = _.some(importArtist.items, (series) => {
|
const isLookingUpArtist = _.some(importArtist.items, (artist) => {
|
||||||
return !series.isPopulated && series.error == null;
|
return !artist.isPopulated && artist.error == null;
|
||||||
});
|
});
|
||||||
|
|
||||||
const isMonitorMixed = isMixed(items, selectedIds, defaultMonitor, 'monitor');
|
const isMonitorMixed = isMixed(items, selectedIds, defaultMonitor, 'monitor');
|
||||||
const isQualityProfileIdMixed = isMixed(items, selectedIds, defaultQualityProfileId, 'qualityProfileId');
|
const isQualityProfileIdMixed = isMixed(items, selectedIds, defaultQualityProfileId, 'qualityProfileId');
|
||||||
const isLanguageProfileIdMixed = isMixed(items, selectedIds, defaultLanguageProfileId, 'languageProfileId');
|
const isLanguageProfileIdMixed = isMixed(items, selectedIds, defaultLanguageProfileId, 'languageProfileId');
|
||||||
const isSeriesTypeMixed = isMixed(items, selectedIds, defaultSeriesType, 'seriesType');
|
|
||||||
const isAlbumFolderMixed = isMixed(items, selectedIds, defaultAlbumFolder, 'albumFolder');
|
const isAlbumFolderMixed = isMixed(items, selectedIds, defaultAlbumFolder, 'albumFolder');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -42,12 +40,10 @@ function createMapStateToProps() {
|
||||||
defaultMonitor,
|
defaultMonitor,
|
||||||
defaultQualityProfileId,
|
defaultQualityProfileId,
|
||||||
defaultLanguageProfileId,
|
defaultLanguageProfileId,
|
||||||
defaultSeriesType,
|
|
||||||
defaultAlbumFolder,
|
defaultAlbumFolder,
|
||||||
isMonitorMixed,
|
isMonitorMixed,
|
||||||
isQualityProfileIdMixed,
|
isQualityProfileIdMixed,
|
||||||
isLanguageProfileIdMixed,
|
isLanguageProfileIdMixed,
|
||||||
isSeriesTypeMixed,
|
|
||||||
isAlbumFolderMixed
|
isAlbumFolderMixed
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,13 +19,6 @@
|
||||||
min-width: 170px;
|
min-width: 170px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.seriesType {
|
|
||||||
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
|
|
||||||
|
|
||||||
flex: 0 1 200px;
|
|
||||||
min-width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.albumFolder {
|
.albumFolder {
|
||||||
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
|
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ function ImportArtistHeader(props) {
|
||||||
|
|
||||||
<VirtualTableHeaderCell
|
<VirtualTableHeaderCell
|
||||||
className={styles.artist}
|
className={styles.artist}
|
||||||
name="series"
|
name="artist"
|
||||||
>
|
>
|
||||||
Artist
|
Artist
|
||||||
</VirtualTableHeaderCell>
|
</VirtualTableHeaderCell>
|
||||||
|
|
|
@ -24,13 +24,6 @@
|
||||||
min-width: 170px;
|
min-width: 170px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.seriesType {
|
|
||||||
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
|
|
||||||
|
|
||||||
flex: 0 1 200px;
|
|
||||||
min-width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.albumFolder {
|
.albumFolder {
|
||||||
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
|
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
|
||||||
|
|
||||||
|
@ -38,7 +31,7 @@
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.series {
|
.artist {
|
||||||
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
|
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
|
||||||
|
|
||||||
flex: 0 1 400px;
|
flex: 0 1 400px;
|
||||||
|
|
|
@ -16,7 +16,6 @@ function ImportArtistRow(props) {
|
||||||
qualityProfileId,
|
qualityProfileId,
|
||||||
languageProfileId,
|
languageProfileId,
|
||||||
albumFolder,
|
albumFolder,
|
||||||
// seriesType,
|
|
||||||
selectedArtist,
|
selectedArtist,
|
||||||
isExistingArtist,
|
isExistingArtist,
|
||||||
showLanguageProfile,
|
showLanguageProfile,
|
||||||
|
@ -77,7 +76,7 @@ function ImportArtistRow(props) {
|
||||||
/>
|
/>
|
||||||
</VirtualTableRowCell>
|
</VirtualTableRowCell>
|
||||||
|
|
||||||
<VirtualTableRowCell className={styles.series}>
|
<VirtualTableRowCell className={styles.artist}>
|
||||||
<ImportArtistSelectArtistConnector
|
<ImportArtistSelectArtistConnector
|
||||||
id={id}
|
id={id}
|
||||||
isExistingArtist={isExistingArtist}
|
isExistingArtist={isExistingArtist}
|
||||||
|
@ -93,7 +92,6 @@ ImportArtistRow.propTypes = {
|
||||||
monitor: PropTypes.string.isRequired,
|
monitor: PropTypes.string.isRequired,
|
||||||
qualityProfileId: PropTypes.number.isRequired,
|
qualityProfileId: PropTypes.number.isRequired,
|
||||||
languageProfileId: PropTypes.number.isRequired,
|
languageProfileId: PropTypes.number.isRequired,
|
||||||
// seriesType: PropTypes.string.isRequired,
|
|
||||||
albumFolder: PropTypes.bool.isRequired,
|
albumFolder: PropTypes.bool.isRequired,
|
||||||
selectedArtist: PropTypes.object,
|
selectedArtist: PropTypes.object,
|
||||||
isExistingArtist: PropTypes.bool.isRequired,
|
isExistingArtist: PropTypes.bool.isRequired,
|
||||||
|
|
|
@ -21,9 +21,9 @@ function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
createImportArtistItemSelector(),
|
createImportArtistItemSelector(),
|
||||||
createAllArtistSelector(),
|
createAllArtistSelector(),
|
||||||
(item, series) => {
|
(item, artist) => {
|
||||||
const selectedArtist = item && item.selectedArtist;
|
const selectedArtist = item && item.selectedArtist;
|
||||||
const isExistingArtist = !!selectedArtist && _.some(series, { foreignArtistId: selectedArtist.foreignArtistId });
|
const isExistingArtist = !!selectedArtist && _.some(artist, { foreignArtistId: selectedArtist.foreignArtistId });
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
@ -59,7 +59,6 @@ class ImportArtistRowConnector extends Component {
|
||||||
const {
|
const {
|
||||||
items,
|
items,
|
||||||
monitor,
|
monitor,
|
||||||
// seriesType,
|
|
||||||
albumFolder
|
albumFolder
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -81,7 +80,6 @@ ImportArtistRowConnector.propTypes = {
|
||||||
rootFolderId: PropTypes.number.isRequired,
|
rootFolderId: PropTypes.number.isRequired,
|
||||||
id: PropTypes.string.isRequired,
|
id: PropTypes.string.isRequired,
|
||||||
monitor: PropTypes.string,
|
monitor: PropTypes.string,
|
||||||
// seriesType: PropTypes.string,
|
|
||||||
albumFolder: PropTypes.bool,
|
albumFolder: PropTypes.bool,
|
||||||
items: PropTypes.arrayOf(PropTypes.object),
|
items: PropTypes.arrayOf(PropTypes.object),
|
||||||
queueLookupArtist: PropTypes.func.isRequired,
|
queueLookupArtist: PropTypes.func.isRequired,
|
||||||
|
|
|
@ -22,9 +22,8 @@ class ImportArtistTable extends Component {
|
||||||
defaultMonitor,
|
defaultMonitor,
|
||||||
defaultQualityProfileId,
|
defaultQualityProfileId,
|
||||||
defaultLanguageProfileId,
|
defaultLanguageProfileId,
|
||||||
defaultSeriesType,
|
|
||||||
defaultAlbumFolder,
|
defaultAlbumFolder,
|
||||||
onSeriesLookup,
|
onArtistLookup,
|
||||||
onSetImportArtistValue
|
onSetImportArtistValue
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -32,14 +31,13 @@ class ImportArtistTable extends Component {
|
||||||
monitor: defaultMonitor,
|
monitor: defaultMonitor,
|
||||||
qualityProfileId: defaultQualityProfileId,
|
qualityProfileId: defaultQualityProfileId,
|
||||||
languageProfileId: defaultLanguageProfileId,
|
languageProfileId: defaultLanguageProfileId,
|
||||||
seriesType: defaultSeriesType,
|
|
||||||
albumFolder: defaultAlbumFolder
|
albumFolder: defaultAlbumFolder
|
||||||
};
|
};
|
||||||
|
|
||||||
unmappedFolders.forEach((unmappedFolder) => {
|
unmappedFolders.forEach((unmappedFolder) => {
|
||||||
const id = unmappedFolder.name;
|
const id = unmappedFolder.name;
|
||||||
|
|
||||||
onSeriesLookup(id, unmappedFolder.path);
|
onArtistLookup(id, unmappedFolder.path);
|
||||||
|
|
||||||
onSetImportArtistValue({
|
onSetImportArtistValue({
|
||||||
id,
|
id,
|
||||||
|
@ -192,7 +190,6 @@ ImportArtistTable.propTypes = {
|
||||||
defaultMonitor: PropTypes.string.isRequired,
|
defaultMonitor: PropTypes.string.isRequired,
|
||||||
defaultQualityProfileId: PropTypes.number,
|
defaultQualityProfileId: PropTypes.number,
|
||||||
defaultLanguageProfileId: PropTypes.number,
|
defaultLanguageProfileId: PropTypes.number,
|
||||||
defaultSeriesType: PropTypes.string.isRequired,
|
|
||||||
defaultAlbumFolder: PropTypes.bool.isRequired,
|
defaultAlbumFolder: PropTypes.bool.isRequired,
|
||||||
allSelected: PropTypes.bool.isRequired,
|
allSelected: PropTypes.bool.isRequired,
|
||||||
allUnselected: PropTypes.bool.isRequired,
|
allUnselected: PropTypes.bool.isRequired,
|
||||||
|
@ -205,7 +202,7 @@ ImportArtistTable.propTypes = {
|
||||||
onSelectAllChange: PropTypes.func.isRequired,
|
onSelectAllChange: PropTypes.func.isRequired,
|
||||||
onSelectedChange: PropTypes.func.isRequired,
|
onSelectedChange: PropTypes.func.isRequired,
|
||||||
onRemoveSelectedStateItem: PropTypes.func.isRequired,
|
onRemoveSelectedStateItem: PropTypes.func.isRequired,
|
||||||
onSeriesLookup: PropTypes.func.isRequired,
|
onArtistLookup: PropTypes.func.isRequired,
|
||||||
onSetImportArtistValue: PropTypes.func.isRequired,
|
onSetImportArtistValue: PropTypes.func.isRequired,
|
||||||
onScroll: PropTypes.func.isRequired
|
onScroll: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,6 @@ function createMapStateToProps() {
|
||||||
defaultMonitor: addArtist.defaults.monitor,
|
defaultMonitor: addArtist.defaults.monitor,
|
||||||
defaultQualityProfileId: addArtist.defaults.qualityProfileId,
|
defaultQualityProfileId: addArtist.defaults.qualityProfileId,
|
||||||
defaultLanguageProfileId: addArtist.defaults.languageProfileId,
|
defaultLanguageProfileId: addArtist.defaults.languageProfileId,
|
||||||
defaultSeriesType: addArtist.defaults.seriesType,
|
|
||||||
defaultAlbumFolder: addArtist.defaults.albumFolder,
|
defaultAlbumFolder: addArtist.defaults.albumFolder,
|
||||||
items: importArtist.items,
|
items: importArtist.items,
|
||||||
isSmallScreen: dimensions.isSmallScreen,
|
isSmallScreen: dimensions.isSmallScreen,
|
||||||
|
@ -27,7 +26,7 @@ function createMapStateToProps() {
|
||||||
|
|
||||||
function createMapDispatchToProps(dispatch, props) {
|
function createMapDispatchToProps(dispatch, props) {
|
||||||
return {
|
return {
|
||||||
onSeriesLookup(name, path) {
|
onArtistLookup(name, path) {
|
||||||
dispatch(queueLookupArtist({
|
dispatch(queueLookupArtist({
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
|
|
|
@ -9,9 +9,9 @@ import AlbumStudio from './AlbumStudio';
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
createClientSideCollectionSelector(),
|
createClientSideCollectionSelector(),
|
||||||
(series) => {
|
(artist) => {
|
||||||
return {
|
return {
|
||||||
...series
|
...artist
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -66,5 +66,5 @@ export default connectSection(
|
||||||
mapDispatchToProps,
|
mapDispatchToProps,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
{ section: 'series', uiSection: 'albumStudio' }
|
{ section: 'artist', uiSection: 'albumStudio' }
|
||||||
)(AlbumStudioConnector);
|
)(AlbumStudioConnector);
|
||||||
|
|
|
@ -4,15 +4,15 @@ import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import createArtistSelector from 'Store/Selectors/createArtistSelector';
|
import createArtistSelector from 'Store/Selectors/createArtistSelector';
|
||||||
import { toggleSeriesMonitored, toggleSeasonMonitored } from 'Store/Actions/artistActions';
|
import { toggleArtistMonitored, toggleSeasonMonitored } from 'Store/Actions/artistActions';
|
||||||
import { toggleEpisodeMonitored } from 'Store/Actions/episodeActions';
|
import { toggleEpisodeMonitored } from 'Store/Actions/episodeActions';
|
||||||
import AlbumStudioRow from './AlbumStudioRow';
|
import AlbumStudioRow from './AlbumStudioRow';
|
||||||
|
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
(series) => {
|
(artist) => {
|
||||||
return _.pick(series, [
|
return _.pick(artist, [
|
||||||
'status',
|
'status',
|
||||||
'nameSlug',
|
'nameSlug',
|
||||||
'artistName',
|
'artistName',
|
||||||
|
@ -25,7 +25,7 @@ function createMapStateToProps() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapDispatchToProps = {
|
const mapDispatchToProps = {
|
||||||
toggleSeriesMonitored,
|
toggleArtistMonitored,
|
||||||
toggleSeasonMonitored,
|
toggleSeasonMonitored,
|
||||||
toggleEpisodeMonitored
|
toggleEpisodeMonitored
|
||||||
};
|
};
|
||||||
|
@ -41,7 +41,7 @@ class AlbumStudioRowConnector extends Component {
|
||||||
monitored
|
monitored
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
this.props.toggleSeriesMonitored({
|
this.props.toggleArtistMonitored({
|
||||||
artistId,
|
artistId,
|
||||||
monitored: !monitored
|
monitored: !monitored
|
||||||
});
|
});
|
||||||
|
@ -71,7 +71,7 @@ class AlbumStudioRowConnector extends Component {
|
||||||
AlbumStudioRowConnector.propTypes = {
|
AlbumStudioRowConnector.propTypes = {
|
||||||
artistId: PropTypes.number.isRequired,
|
artistId: PropTypes.number.isRequired,
|
||||||
monitored: PropTypes.bool.isRequired,
|
monitored: PropTypes.bool.isRequired,
|
||||||
toggleSeriesMonitored: PropTypes.func.isRequired,
|
toggleArtistMonitored: PropTypes.func.isRequired,
|
||||||
toggleSeasonMonitored: PropTypes.func.isRequired,
|
toggleSeasonMonitored: PropTypes.func.isRequired,
|
||||||
toggleEpisodeMonitored: PropTypes.func.isRequired
|
toggleEpisodeMonitored: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@import "Content/icons";
|
@import "Content/icons";
|
||||||
|
|
||||||
.delete-series-modal {
|
.delete-artist-modal {
|
||||||
|
|
||||||
i {
|
i {
|
||||||
margin-right : 5px;
|
margin-right : 5px;
|
||||||
|
|
|
@ -9,8 +9,8 @@ import DeleteArtistModalContent from './DeleteArtistModalContent';
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
(series) => {
|
(artist) => {
|
||||||
return series;
|
return artist;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,12 +13,11 @@ function createMapStateToProps() {
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
createTrackFileSelector(),
|
createTrackFileSelector(),
|
||||||
createCommandsSelector(),
|
createCommandsSelector(),
|
||||||
(id, sceneSeasonNumber, series, trackFile, commands) => {
|
(id, sceneSeasonNumber, artist, trackFile, commands) => {
|
||||||
const alternateTitles = sceneSeasonNumber ? _.filter(series.alternateTitles, { sceneSeasonNumber }) : [];
|
const alternateTitles = sceneSeasonNumber ? _.filter(artist.alternateTitles, { sceneSeasonNumber }) : [];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
artistMonitored: series.monitored,
|
artistMonitored: artist.monitored,
|
||||||
seriesType: series.seriesType,
|
|
||||||
trackFilePath: trackFile ? trackFile.path : null,
|
trackFilePath: trackFile ? trackFile.path : null,
|
||||||
trackFileRelativePath: trackFile ? trackFile.relativePath : null,
|
trackFileRelativePath: trackFile ? trackFile.relativePath : null,
|
||||||
alternateTitles
|
alternateTitles
|
||||||
|
|
|
@ -24,27 +24,27 @@ function createMapStateToProps() {
|
||||||
(nameSlug, episodes, trackFiles, allArtists, commands) => {
|
(nameSlug, episodes, trackFiles, allArtists, commands) => {
|
||||||
const sortedArtist = _.orderBy(allArtists, 'sortName');
|
const sortedArtist = _.orderBy(allArtists, 'sortName');
|
||||||
const artistIndex = _.findIndex(sortedArtist, { nameSlug });
|
const artistIndex = _.findIndex(sortedArtist, { nameSlug });
|
||||||
const series = sortedArtist[artistIndex];
|
const artist = sortedArtist[artistIndex];
|
||||||
|
|
||||||
if (!series) {
|
if (!artist) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const previousArtist = sortedArtist[artistIndex - 1] || _.last(sortedArtist);
|
const previousArtist = sortedArtist[artistIndex - 1] || _.last(sortedArtist);
|
||||||
const nextArtist = sortedArtist[artistIndex + 1] || _.first(sortedArtist);
|
const nextArtist = sortedArtist[artistIndex + 1] || _.first(sortedArtist);
|
||||||
const isArtistRefreshing = !!findCommand(commands, { name: commandNames.REFRESH_ARTIST, artistId: series.id });
|
const isArtistRefreshing = !!findCommand(commands, { name: commandNames.REFRESH_ARTIST, artistId: artist.id });
|
||||||
const allArtistRefreshing = _.some(commands, (command) => command.name === commandNames.REFRESH_ARTIST && !command.body.artistId);
|
const allArtistRefreshing = _.some(commands, (command) => command.name === commandNames.REFRESH_ARTIST && !command.body.artistId);
|
||||||
const isRefreshing = isArtistRefreshing || allArtistRefreshing;
|
const isRefreshing = isArtistRefreshing || allArtistRefreshing;
|
||||||
const isSearching = !!findCommand(commands, { name: commandNames.ARTIST_SEARCH, artistId: series.id });
|
const isSearching = !!findCommand(commands, { name: commandNames.ARTIST_SEARCH, artistId: artist.id });
|
||||||
const isRenamingFiles = !!findCommand(commands, { name: commandNames.RENAME_FILES, artistId: series.id });
|
const isRenamingFiles = !!findCommand(commands, { name: commandNames.RENAME_FILES, artistId: artist.id });
|
||||||
const isRenamingArtistCommand = findCommand(commands, { name: commandNames.RENAME_ARTIST });
|
const isRenamingArtistCommand = findCommand(commands, { name: commandNames.RENAME_ARTIST });
|
||||||
const isRenamingArtist = !!(isRenamingArtistCommand && isRenamingArtistCommand.body.artistId.indexOf(series.id) > -1);
|
const isRenamingArtist = !!(isRenamingArtistCommand && isRenamingArtistCommand.body.artistId.indexOf(artist.id) > -1);
|
||||||
|
|
||||||
const isFetching = episodes.isFetching || trackFiles.isFetching;
|
const isFetching = episodes.isFetching || trackFiles.isFetching;
|
||||||
const isPopulated = episodes.isPopulated && trackFiles.isPopulated;
|
const isPopulated = episodes.isPopulated && trackFiles.isPopulated;
|
||||||
const episodesError = episodes.error;
|
const episodesError = episodes.error;
|
||||||
const trackFilesError = trackFiles.error;
|
const trackFilesError = trackFiles.error;
|
||||||
const alternateTitles = _.reduce(series.alternateTitles, (acc, alternateTitle) => {
|
const alternateTitles = _.reduce(artist.alternateTitles, (acc, alternateTitle) => {
|
||||||
if ((alternateTitle.seasonNumber === -1 || alternateTitle.seasonNumber === undefined) &&
|
if ((alternateTitle.seasonNumber === -1 || alternateTitle.seasonNumber === undefined) &&
|
||||||
(alternateTitle.sceneSeasonNumber === -1 || alternateTitle.sceneSeasonNumber === undefined)) {
|
(alternateTitle.sceneSeasonNumber === -1 || alternateTitle.sceneSeasonNumber === undefined)) {
|
||||||
acc.push(alternateTitle.title);
|
acc.push(alternateTitle.title);
|
||||||
|
@ -54,7 +54,7 @@ function createMapStateToProps() {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...series,
|
...artist,
|
||||||
alternateTitles,
|
alternateTitles,
|
||||||
isRefreshing,
|
isRefreshing,
|
||||||
isSearching,
|
isSearching,
|
||||||
|
|
|
@ -54,7 +54,7 @@ class ArtistDetailsPageConnector extends Component {
|
||||||
if (!nameSlug) {
|
if (!nameSlug) {
|
||||||
return (
|
return (
|
||||||
<NotFound
|
<NotFound
|
||||||
message="Sorry, that series cannot be found."
|
message="Sorry, that artist cannot be found."
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,10 +20,10 @@ function createMapStateToProps() {
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
createCommandsSelector(),
|
createCommandsSelector(),
|
||||||
createDimensionsSelector(),
|
createDimensionsSelector(),
|
||||||
(label, episodes, series, commands, dimensions) => {
|
(label, episodes, artist, commands, dimensions) => {
|
||||||
const isSearching = !!findCommand(commands, {
|
const isSearching = !!findCommand(commands, {
|
||||||
name: commandNames.SEASON_SEARCH,
|
name: commandNames.SEASON_SEARCH,
|
||||||
artistId: series.id,
|
artistId: artist.id,
|
||||||
label
|
label
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ function createMapStateToProps() {
|
||||||
items: sortedEpisodes,
|
items: sortedEpisodes,
|
||||||
columns: episodes.columns,
|
columns: episodes.columns,
|
||||||
isSearching,
|
isSearching,
|
||||||
artistMonitored: series.monitored,
|
artistMonitored: artist.monitored,
|
||||||
isSmallScreen: dimensions.isSmallScreen
|
isSmallScreen: dimensions.isSmallScreen
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
createTagsSelector(),
|
createTagsSelector(),
|
||||||
(series, tagList) => {
|
(artist, tagList) => {
|
||||||
const tags = _.reduce(series.tags, (acc, tag) => {
|
const tags = _.reduce(artist.tags, (acc, tag) => {
|
||||||
const matchingTag = _.find(tagList, { id: tag });
|
const matchingTag = _.find(tagList, { id: tag });
|
||||||
|
|
||||||
if (matchingTag) {
|
if (matchingTag) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ class EditArtistModalConnector extends Component {
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onModalClose = () => {
|
onModalClose = () => {
|
||||||
this.props.clearPendingChanges({ section: 'series' });
|
this.props.clearPendingChanges({ section: 'artist' });
|
||||||
this.props.onModalClose();
|
this.props.onModalClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@ class EditArtistModalContent extends Component {
|
||||||
albumFolder,
|
albumFolder,
|
||||||
qualityProfileId,
|
qualityProfileId,
|
||||||
languageProfileId,
|
languageProfileId,
|
||||||
// seriesType,
|
|
||||||
path,
|
path,
|
||||||
tags
|
tags
|
||||||
} = item;
|
} = item;
|
||||||
|
|
|
@ -10,30 +10,29 @@ import EditArtistModalContent from './EditArtistModalContent';
|
||||||
|
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state) => state.series,
|
(state) => state.artist,
|
||||||
(state) => state.settings.languageProfiles,
|
(state) => state.settings.languageProfiles,
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
(seriesState, languageProfiles, series) => {
|
(artistState, languageProfiles, artist) => {
|
||||||
const {
|
const {
|
||||||
isSaving,
|
isSaving,
|
||||||
saveError,
|
saveError,
|
||||||
pendingChanges
|
pendingChanges
|
||||||
} = seriesState;
|
} = artistState;
|
||||||
|
|
||||||
const seriesSettings = _.pick(series, [
|
const artistSettings = _.pick(artist, [
|
||||||
'monitored',
|
'monitored',
|
||||||
'albumFolder',
|
'albumFolder',
|
||||||
'qualityProfileId',
|
'qualityProfileId',
|
||||||
'languageProfileId',
|
'languageProfileId',
|
||||||
// 'seriesType',
|
|
||||||
'path',
|
'path',
|
||||||
'tags'
|
'tags'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const settings = selectSettings(seriesSettings, pendingChanges, saveError);
|
const settings = selectSettings(artistSettings, pendingChanges, saveError);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
artistName: series.artistName,
|
artistName: artist.artistName,
|
||||||
isSaving,
|
isSaving,
|
||||||
saveError,
|
saveError,
|
||||||
pendingChanges,
|
pendingChanges,
|
||||||
|
|
|
@ -14,11 +14,11 @@ function createMapStateToProps() {
|
||||||
(state) => state.settings.languageProfiles,
|
(state) => state.settings.languageProfiles,
|
||||||
createClientSideCollectionSelector(),
|
createClientSideCollectionSelector(),
|
||||||
createCommandSelector(commandNames.RENAME_ARTIST),
|
createCommandSelector(commandNames.RENAME_ARTIST),
|
||||||
(languageProfiles, series, isOrganizingArtist) => {
|
(languageProfiles, artist, isOrganizingArtist) => {
|
||||||
return {
|
return {
|
||||||
isOrganizingArtist,
|
isOrganizingArtist,
|
||||||
showLanguageProfile: languageProfiles.items.length > 1,
|
showLanguageProfile: languageProfiles.items.length > 1,
|
||||||
...series
|
...artist
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -82,5 +82,5 @@ export default connectSection(
|
||||||
mapDispatchToProps,
|
mapDispatchToProps,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
{ section: 'series', uiSection: 'artistEditor' }
|
{ section: 'artist', uiSection: 'artistEditor' }
|
||||||
)(ArtistEditorConnector);
|
)(ArtistEditorConnector);
|
||||||
|
|
|
@ -5,7 +5,6 @@ import SelectInput from 'Components/Form/SelectInput';
|
||||||
import LanguageProfileSelectInputConnector from 'Components/Form/LanguageProfileSelectInputConnector';
|
import LanguageProfileSelectInputConnector from 'Components/Form/LanguageProfileSelectInputConnector';
|
||||||
import QualityProfileSelectInputConnector from 'Components/Form/QualityProfileSelectInputConnector';
|
import QualityProfileSelectInputConnector from 'Components/Form/QualityProfileSelectInputConnector';
|
||||||
import RootFolderSelectInputConnector from 'Components/Form/RootFolderSelectInputConnector';
|
import RootFolderSelectInputConnector from 'Components/Form/RootFolderSelectInputConnector';
|
||||||
// import SeriesTypeSelectInput from 'Components/Form/SeriesTypeSelectInput';
|
|
||||||
import SpinnerButton from 'Components/Link/SpinnerButton';
|
import SpinnerButton from 'Components/Link/SpinnerButton';
|
||||||
import PageContentFooter from 'Components/Page/PageContentFooter';
|
import PageContentFooter from 'Components/Page/PageContentFooter';
|
||||||
import TagsModal from './Tags/TagsModal';
|
import TagsModal from './Tags/TagsModal';
|
||||||
|
|
|
@ -43,7 +43,7 @@ class DeleteArtistModalContent extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
series,
|
artist,
|
||||||
onModalClose
|
onModalClose
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const deleteFiles = this.state.deleteFiles;
|
const deleteFiles = this.state.deleteFiles;
|
||||||
|
@ -57,13 +57,13 @@ class DeleteArtistModalContent extends Component {
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<div>
|
<div>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>{`Delete Artist Folder${series.length > 1 ? 's' : ''}`}</FormLabel>
|
<FormLabel>{`Delete Artist Folder${artist.length > 1 ? 's' : ''}`}</FormLabel>
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.CHECK}
|
type={inputTypes.CHECK}
|
||||||
name="deleteFiles"
|
name="deleteFiles"
|
||||||
value={deleteFiles}
|
value={deleteFiles}
|
||||||
helpText={`Delete Artist Folder${series.length > 1 ? 's' : ''} and all contents`}
|
helpText={`Delete Artist Folder${artist.length > 1 ? 's' : ''} and all contents`}
|
||||||
kind={kinds.DANGER}
|
kind={kinds.DANGER}
|
||||||
onChange={this.onDeleteFilesChange}
|
onChange={this.onDeleteFilesChange}
|
||||||
/>
|
/>
|
||||||
|
@ -71,12 +71,12 @@ class DeleteArtistModalContent extends Component {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.message}>
|
<div className={styles.message}>
|
||||||
{`Are you sure you want to delete ${series.length} selected artist${series.length > 1 ? 's' : ''}${deleteFiles ? ' and all contents' : ''}?`}
|
{`Are you sure you want to delete ${artist.length} selected artist${artist.length > 1 ? 's' : ''}${deleteFiles ? ' and all contents' : ''}?`}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{
|
{
|
||||||
series.map((s) => {
|
artist.map((s) => {
|
||||||
return (
|
return (
|
||||||
<li key={s.artistName}>
|
<li key={s.artistName}>
|
||||||
<span>{s.artistName}</span>
|
<span>{s.artistName}</span>
|
||||||
|
@ -115,7 +115,7 @@ class DeleteArtistModalContent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteArtistModalContent.propTypes = {
|
DeleteArtistModalContent.propTypes = {
|
||||||
series: PropTypes.arrayOf(PropTypes.object).isRequired,
|
artist: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
onModalClose: PropTypes.func.isRequired,
|
onModalClose: PropTypes.func.isRequired,
|
||||||
onDeleteSelectedPress: PropTypes.func.isRequired
|
onDeleteSelectedPress: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@ function createMapStateToProps() {
|
||||||
});
|
});
|
||||||
|
|
||||||
const sortedArtist = _.orderBy(selectedArtist, 'sortName');
|
const sortedArtist = _.orderBy(selectedArtist, 'sortName');
|
||||||
const series = _.map(sortedArtist, (s) => {
|
const artist = _.map(sortedArtist, (s) => {
|
||||||
return {
|
return {
|
||||||
artistName: s.artistName,
|
artistName: s.artistName,
|
||||||
path: s.path
|
path: s.path
|
||||||
|
@ -23,7 +23,7 @@ function createMapStateToProps() {
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
series
|
artist
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,11 +13,11 @@ function createMapStateToProps() {
|
||||||
(state, { artistIds }) => artistIds,
|
(state, { artistIds }) => artistIds,
|
||||||
createAllArtistSelector(),
|
createAllArtistSelector(),
|
||||||
(artistIds, allArtists) => {
|
(artistIds, allArtists) => {
|
||||||
const series = _.intersectionWith(allArtists, artistIds, (s, id) => {
|
const artist = _.intersectionWith(allArtists, artistIds, (s, id) => {
|
||||||
return s.id === id;
|
return s.id === id;
|
||||||
});
|
});
|
||||||
|
|
||||||
const sortedArtist = _.orderBy(series, 'sortName');
|
const sortedArtist = _.orderBy(artist, 'sortName');
|
||||||
const artistNames = _.map(sortedArtist, 'artistName');
|
const artistNames = _.map(sortedArtist, 'artistName');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -93,7 +93,7 @@ class TagsModalContent extends Component {
|
||||||
value={applyTags}
|
value={applyTags}
|
||||||
values={applyTagsOptions}
|
values={applyTagsOptions}
|
||||||
helpTexts={[
|
helpTexts={[
|
||||||
'How to apply tags to the selected series',
|
'How to apply tags to the selected artist',
|
||||||
'Add: Add the tags the existing list of tags',
|
'Add: Add the tags the existing list of tags',
|
||||||
'Remove: Remove the entered tags',
|
'Remove: Remove the entered tags',
|
||||||
'Replace: Replace the tags with the entered tags (enter no tags to clear all tags)'
|
'Replace: Replace the tags with the entered tags (enter no tags to clear all tags)'
|
||||||
|
|
|
@ -11,11 +11,11 @@ function createMapStateToProps() {
|
||||||
createAllArtistSelector(),
|
createAllArtistSelector(),
|
||||||
createTagsSelector(),
|
createTagsSelector(),
|
||||||
(artistIds, allArtists, tagList) => {
|
(artistIds, allArtists, tagList) => {
|
||||||
const series = _.intersectionWith(allArtists, artistIds, (s, id) => {
|
const artist = _.intersectionWith(allArtists, artistIds, (s, id) => {
|
||||||
return s.id === id;
|
return s.id === id;
|
||||||
});
|
});
|
||||||
|
|
||||||
const artistTags = _.uniq(_.concat(..._.map(series, 'tags')));
|
const artistTags = _.uniq(_.concat(..._.map(artist, 'tags')));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
artistTags,
|
artistTags,
|
||||||
|
|
|
@ -302,7 +302,7 @@ class ArtistIndex extends Component {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ArtistIndexFooter
|
<ArtistIndexFooter
|
||||||
series={items}
|
artist={items}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,17 +44,17 @@ function getScrollTop(view, scrollTop, isSmallScreen) {
|
||||||
|
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state) => state.series,
|
(state) => state.artist,
|
||||||
(state) => state.artistIndex,
|
(state) => state.artistIndex,
|
||||||
createCommandSelector(commandNames.REFRESH_ARTIST),
|
createCommandSelector(commandNames.REFRESH_ARTIST),
|
||||||
createCommandSelector(commandNames.RSS_SYNC),
|
createCommandSelector(commandNames.RSS_SYNC),
|
||||||
createDimensionsSelector(),
|
createDimensionsSelector(),
|
||||||
(series, artistIndex, isRefreshingArtist, isRssSyncExecuting, dimensionsState) => {
|
(artist, artistIndex, isRefreshingArtist, isRssSyncExecuting, dimensionsState) => {
|
||||||
return {
|
return {
|
||||||
isRefreshingArtist,
|
isRefreshingArtist,
|
||||||
isRssSyncExecuting,
|
isRssSyncExecuting,
|
||||||
isSmallScreen: dimensionsState.isSmallScreen,
|
isSmallScreen: dimensionsState.isSmallScreen,
|
||||||
...series,
|
...artist,
|
||||||
...artistIndex
|
...artistIndex
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,15 +4,15 @@ import DescriptionList from 'Components/DescriptionList/DescriptionList';
|
||||||
import DescriptionListItem from 'Components/DescriptionList/DescriptionListItem';
|
import DescriptionListItem from 'Components/DescriptionList/DescriptionListItem';
|
||||||
import styles from './ArtistIndexFooter.css';
|
import styles from './ArtistIndexFooter.css';
|
||||||
|
|
||||||
function ArtistIndexFooter({ series }) {
|
function ArtistIndexFooter({ artist }) {
|
||||||
const count = series.length;
|
const count = artist.length;
|
||||||
let tracks = 0;
|
let tracks = 0;
|
||||||
let trackFiles = 0;
|
let trackFiles = 0;
|
||||||
let ended = 0;
|
let ended = 0;
|
||||||
let continuing = 0;
|
let continuing = 0;
|
||||||
let monitored = 0;
|
let monitored = 0;
|
||||||
|
|
||||||
series.forEach((s) => {
|
artist.forEach((s) => {
|
||||||
tracks += s.trackCount || 0;
|
tracks += s.trackCount || 0;
|
||||||
trackFiles += s.trackFileCount || 0;
|
trackFiles += s.trackFileCount || 0;
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ function ArtistIndexFooter({ series }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ArtistIndexFooter.propTypes = {
|
ArtistIndexFooter.propTypes = {
|
||||||
series: PropTypes.arrayOf(PropTypes.object).isRequired
|
artist: PropTypes.arrayOf(PropTypes.object).isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ArtistIndexFooter;
|
export default ArtistIndexFooter;
|
||||||
|
|
|
@ -216,9 +216,9 @@ class ArtistIndexBanners extends Component {
|
||||||
showQualityProfile
|
showQualityProfile
|
||||||
} = bannerOptions;
|
} = bannerOptions;
|
||||||
|
|
||||||
const series = items[rowIndex * columnCount + columnIndex];
|
const artist = items[rowIndex * columnCount + columnIndex];
|
||||||
|
|
||||||
if (!series) {
|
if (!artist) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ class ArtistIndexBanners extends Component {
|
||||||
shortDateFormat={shortDateFormat}
|
shortDateFormat={shortDateFormat}
|
||||||
timeFormat={timeFormat}
|
timeFormat={timeFormat}
|
||||||
style={style}
|
style={style}
|
||||||
{...series}
|
{...artist}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,14 +11,14 @@ function createMapStateToProps() {
|
||||||
createClientSideCollectionSelector(),
|
createClientSideCollectionSelector(),
|
||||||
createUISettingsSelector(),
|
createUISettingsSelector(),
|
||||||
createDimensionsSelector(),
|
createDimensionsSelector(),
|
||||||
(bannerOptions, series, uiSettings, dimensions) => {
|
(bannerOptions, artist, uiSettings, dimensions) => {
|
||||||
return {
|
return {
|
||||||
bannerOptions,
|
bannerOptions,
|
||||||
showRelativeDates: uiSettings.showRelativeDates,
|
showRelativeDates: uiSettings.showRelativeDates,
|
||||||
shortDateFormat: uiSettings.shortDateFormat,
|
shortDateFormat: uiSettings.shortDateFormat,
|
||||||
timeFormat: uiSettings.timeFormat,
|
timeFormat: uiSettings.timeFormat,
|
||||||
isSmallScreen: dimensions.isSmallScreen,
|
isSmallScreen: dimensions.isSmallScreen,
|
||||||
...series
|
...artist
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -29,5 +29,5 @@ export default connectSection(
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
{ withRef: true },
|
{ withRef: true },
|
||||||
{ section: 'series', uiSection: 'artistIndex' }
|
{ section: 'artist', uiSection: 'artistIndex' }
|
||||||
)(ArtistIndexBanners);
|
)(ArtistIndexBanners);
|
||||||
|
|
|
@ -216,9 +216,9 @@ class ArtistIndexPosters extends Component {
|
||||||
showQualityProfile
|
showQualityProfile
|
||||||
} = posterOptions;
|
} = posterOptions;
|
||||||
|
|
||||||
const series = items[rowIndex * columnCount + columnIndex];
|
const artist = items[rowIndex * columnCount + columnIndex];
|
||||||
|
|
||||||
if (!series) {
|
if (!artist) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ class ArtistIndexPosters extends Component {
|
||||||
shortDateFormat={shortDateFormat}
|
shortDateFormat={shortDateFormat}
|
||||||
timeFormat={timeFormat}
|
timeFormat={timeFormat}
|
||||||
style={style}
|
style={style}
|
||||||
{...series}
|
{...artist}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,14 +11,14 @@ function createMapStateToProps() {
|
||||||
createClientSideCollectionSelector(),
|
createClientSideCollectionSelector(),
|
||||||
createUISettingsSelector(),
|
createUISettingsSelector(),
|
||||||
createDimensionsSelector(),
|
createDimensionsSelector(),
|
||||||
(posterOptions, series, uiSettings, dimensions) => {
|
(posterOptions, artist, uiSettings, dimensions) => {
|
||||||
return {
|
return {
|
||||||
posterOptions,
|
posterOptions,
|
||||||
showRelativeDates: uiSettings.showRelativeDates,
|
showRelativeDates: uiSettings.showRelativeDates,
|
||||||
shortDateFormat: uiSettings.shortDateFormat,
|
shortDateFormat: uiSettings.shortDateFormat,
|
||||||
timeFormat: uiSettings.timeFormat,
|
timeFormat: uiSettings.timeFormat,
|
||||||
isSmallScreen: dimensions.isSmallScreen,
|
isSmallScreen: dimensions.isSmallScreen,
|
||||||
...series
|
...artist
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -29,5 +29,5 @@ export default connectSection(
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
{ withRef: true },
|
{ withRef: true },
|
||||||
{ section: 'series', uiSection: 'artistIndex' }
|
{ section: 'artist', uiSection: 'artistIndex' }
|
||||||
)(ArtistIndexPosters);
|
)(ArtistIndexPosters);
|
||||||
|
|
|
@ -69,7 +69,7 @@ class ArtistIndexTable extends Component {
|
||||||
columns
|
columns
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const series = items[rowIndex];
|
const artist = items[rowIndex];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ArtistIndexItemConnector
|
<ArtistIndexItemConnector
|
||||||
|
@ -77,7 +77,7 @@ class ArtistIndexTable extends Component {
|
||||||
component={ArtistIndexRow}
|
component={ArtistIndexRow}
|
||||||
style={style}
|
style={style}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
{...series}
|
{...artist}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@ function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state) => state.app.dimensions,
|
(state) => state.app.dimensions,
|
||||||
createClientSideCollectionSelector(),
|
createClientSideCollectionSelector(),
|
||||||
(dimensions, series) => {
|
(dimensions, artist) => {
|
||||||
return {
|
return {
|
||||||
isSmallScreen: dimensions.isSmallScreen,
|
isSmallScreen: dimensions.isSmallScreen,
|
||||||
...series
|
...artist
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -30,5 +30,5 @@ export default connectSection(
|
||||||
createMapDispatchToProps,
|
createMapDispatchToProps,
|
||||||
undefined,
|
undefined,
|
||||||
{ withRef: true },
|
{ withRef: true },
|
||||||
{ section: 'series', uiSection: 'artistIndex' }
|
{ section: 'artist', uiSection: 'artistIndex' }
|
||||||
)(ArtistIndexTable);
|
)(ArtistIndexTable);
|
||||||
|
|
|
@ -44,9 +44,6 @@ class AgendaEvent extends Component {
|
||||||
id,
|
id,
|
||||||
artist,
|
artist,
|
||||||
title,
|
title,
|
||||||
// seasonNumber,
|
|
||||||
// episodeNumber,
|
|
||||||
// absoluteEpisodeNumber,
|
|
||||||
releaseDate,
|
releaseDate,
|
||||||
monitored,
|
monitored,
|
||||||
hasFile,
|
hasFile,
|
||||||
|
@ -101,9 +98,6 @@ class AgendaEvent extends Component {
|
||||||
{
|
{
|
||||||
!!queueItem &&
|
!!queueItem &&
|
||||||
<CalendarEventQueueDetails
|
<CalendarEventQueueDetails
|
||||||
seriesType={artist.seriesType}
|
|
||||||
// seasonNumber={seasonNumber}
|
|
||||||
// absoluteEpisodeNumber={absoluteEpisodeNumber}
|
|
||||||
{...queueItem}
|
{...queueItem}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
@ -135,9 +129,6 @@ AgendaEvent.propTypes = {
|
||||||
id: PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
artist: PropTypes.object.isRequired,
|
artist: PropTypes.object.isRequired,
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
// seasonNumber: PropTypes.number.isRequired,
|
|
||||||
// episodeNumber: PropTypes.number.isRequired,
|
|
||||||
// absoluteEpisodeNumber: PropTypes.number,
|
|
||||||
releaseDate: PropTypes.string.isRequired,
|
releaseDate: PropTypes.string.isRequired,
|
||||||
monitored: PropTypes.bool.isRequired,
|
monitored: PropTypes.bool.isRequired,
|
||||||
hasFile: PropTypes.bool.isRequired,
|
hasFile: PropTypes.bool.isRequired,
|
||||||
|
|
|
@ -66,7 +66,7 @@ class CalendarEvent extends Component {
|
||||||
const downloading = !!(queueItem || grabbed);
|
const downloading = !!(queueItem || grabbed);
|
||||||
const isMonitored = artist.monitored && monitored;
|
const isMonitored = artist.monitored && monitored;
|
||||||
const statusStyle = getStatusStyle(id, downloading, startTime, isMonitored);
|
const statusStyle = getStatusStyle(id, downloading, startTime, isMonitored);
|
||||||
// const missingAbsoluteNumber = artist.seriesType === 'anime' && seasonNumber > 0 && !absoluteEpisodeNumber;
|
// const missingAbsoluteNumber = artist.artistType === 'anime' && seasonNumber > 0 && !absoluteEpisodeNumber;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -2,14 +2,14 @@ import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import SelectInput from './SelectInput';
|
import SelectInput from './SelectInput';
|
||||||
|
|
||||||
const seriesTypeOptions = [
|
const artistTypeOptions = [
|
||||||
{ key: 'standard', value: 'Standard' },
|
{ key: 'standard', value: 'Standard' },
|
||||||
{ key: 'daily', value: 'Daily' },
|
{ key: 'daily', value: 'Daily' },
|
||||||
{ key: 'anime', value: 'Anime' }
|
{ key: 'anime', value: 'Anime' }
|
||||||
];
|
];
|
||||||
|
|
||||||
function SeriesTypeSelectInput(props) {
|
function SeriesTypeSelectInput(props) {
|
||||||
const values = [...seriesTypeOptions];
|
const values = [...artistTypeOptions];
|
||||||
|
|
||||||
const {
|
const {
|
||||||
includeNoChange,
|
includeNoChange,
|
||||||
|
|
|
@ -39,7 +39,7 @@ class MonitorToggleButton extends Component {
|
||||||
className={styles.disabledButton}
|
className={styles.disabledButton}
|
||||||
size={size}
|
size={size}
|
||||||
name={iconName}
|
name={iconName}
|
||||||
title="Cannot toogle monitored state when series is unmonitored"
|
title="Cannot toogle monitored state when artist is unmonitored"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ function ErrorPage(props) {
|
||||||
const {
|
const {
|
||||||
version,
|
version,
|
||||||
isLocalStorageSupported,
|
isLocalStorageSupported,
|
||||||
seriesError,
|
artistError,
|
||||||
tagsError,
|
tagsError,
|
||||||
qualityProfilesError,
|
qualityProfilesError,
|
||||||
uiSettingsError
|
uiSettingsError
|
||||||
|
@ -17,10 +17,10 @@ function ErrorPage(props) {
|
||||||
|
|
||||||
if (!isLocalStorageSupported) {
|
if (!isLocalStorageSupported) {
|
||||||
errorMessage = 'Local Storage is not supported or disabled. A plugin or private browsing may have disabled it.';
|
errorMessage = 'Local Storage is not supported or disabled. A plugin or private browsing may have disabled it.';
|
||||||
} else if (seriesError) {
|
} else if (artistError) {
|
||||||
errorMessage = getErrorMessage(seriesError, 'Failed to load artist from API');
|
errorMessage = getErrorMessage(artistError, 'Failed to load artist from API');
|
||||||
} else if (tagsError) {
|
} else if (tagsError) {
|
||||||
errorMessage = getErrorMessage(seriesError, 'Failed to load artist from API');
|
errorMessage = getErrorMessage(artistError, 'Failed to load artist from API');
|
||||||
} else if (qualityProfilesError) {
|
} else if (qualityProfilesError) {
|
||||||
errorMessage = getErrorMessage(qualityProfilesError, 'Failed to load quality profiles from API');
|
errorMessage = getErrorMessage(qualityProfilesError, 'Failed to load quality profiles from API');
|
||||||
} else if (uiSettingsError) {
|
} else if (uiSettingsError) {
|
||||||
|
@ -43,7 +43,7 @@ function ErrorPage(props) {
|
||||||
ErrorPage.propTypes = {
|
ErrorPage.propTypes = {
|
||||||
version: PropTypes.string.isRequired,
|
version: PropTypes.string.isRequired,
|
||||||
isLocalStorageSupported: PropTypes.bool.isRequired,
|
isLocalStorageSupported: PropTypes.bool.isRequired,
|
||||||
seriesError: PropTypes.object,
|
artistError: PropTypes.object,
|
||||||
tagsError: PropTypes.object,
|
tagsError: PropTypes.object,
|
||||||
qualityProfilesError: PropTypes.object,
|
qualityProfilesError: PropTypes.object,
|
||||||
uiSettingsError: PropTypes.object
|
uiSettingsError: PropTypes.object
|
||||||
|
|
|
@ -36,14 +36,14 @@
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.seriesContainer {
|
.artistContainer {
|
||||||
@add-mixin scrollbar;
|
@add-mixin scrollbar;
|
||||||
@add-mixin scrollbarTrack;
|
@add-mixin scrollbarTrack;
|
||||||
@add-mixin scrollbarThumb;
|
@add-mixin scrollbarThumb;
|
||||||
}
|
}
|
||||||
|
|
||||||
.containerOpen {
|
.containerOpen {
|
||||||
.seriesContainer {
|
.artistContainer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 42px;
|
top: 42px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
color: $disabledColor;
|
color: $disabledColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.addNewSeriesSuggestion {
|
.addNewArtistSuggestion {
|
||||||
padding: 0 3px;
|
padding: 0 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ class ArtistSearchInput extends Component {
|
||||||
renderSuggestion(item, { query }) {
|
renderSuggestion(item, { query }) {
|
||||||
if (item.type === ADD_NEW_TYPE) {
|
if (item.type === ADD_NEW_TYPE) {
|
||||||
return (
|
return (
|
||||||
<div className={styles.addNewSeriesSuggestion}>
|
<div className={styles.addNewArtistSuggestion}>
|
||||||
Search for {query}
|
Search for {query}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -76,9 +76,9 @@ class ArtistSearchInput extends Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
goToArtist(series) {
|
goToArtist(artist) {
|
||||||
this.setState({ value: '' });
|
this.setState({ value: '' });
|
||||||
this.props.onGoToSeries(series.nameSlug);
|
this.props.onGoToArtist(artist.nameSlug);
|
||||||
}
|
}
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
|
@ -117,8 +117,8 @@ class ArtistSearchInput extends Component {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If an suggestion is not selected go to the first series,
|
// If an suggestion is not selected go to the first artist,
|
||||||
// otherwise go to the selected series.
|
// otherwise go to the selected artist.
|
||||||
|
|
||||||
if (highlightedSuggestionIndex == null) {
|
if (highlightedSuggestionIndex == null) {
|
||||||
this.goToArtist(suggestions[0]);
|
this.goToArtist(suggestions[0]);
|
||||||
|
@ -134,12 +134,12 @@ class ArtistSearchInput extends Component {
|
||||||
onSuggestionsFetchRequested = ({ value }) => {
|
onSuggestionsFetchRequested = ({ value }) => {
|
||||||
const lowerCaseValue = jdu.replace(value).toLowerCase();
|
const lowerCaseValue = jdu.replace(value).toLowerCase();
|
||||||
|
|
||||||
const suggestions = _.filter(this.props.series, (series) => {
|
const suggestions = _.filter(this.props.artist, (artist) => {
|
||||||
// Check the title first and if there isn't a match fallback to the alternate titles
|
// Check the title first and if there isn't a match fallback to the alternate titles
|
||||||
|
|
||||||
const titleMatch = jdu.replace(series.artistName).toLowerCase().contains(lowerCaseValue);
|
const titleMatch = jdu.replace(artist.artistName).toLowerCase().contains(lowerCaseValue);
|
||||||
|
|
||||||
return titleMatch || _.some(series.alternateTitles, (alternateTitle) => {
|
return titleMatch || _.some(artist.alternateTitles, (alternateTitle) => {
|
||||||
return jdu.replace(alternateTitle.title).toLowerCase().contains(lowerCaseValue);
|
return jdu.replace(alternateTitle.title).toLowerCase().contains(lowerCaseValue);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -192,7 +192,7 @@ class ArtistSearchInput extends Component {
|
||||||
const inputProps = {
|
const inputProps = {
|
||||||
ref: this.setInputRef,
|
ref: this.setInputRef,
|
||||||
className: styles.input,
|
className: styles.input,
|
||||||
name: 'seriesSearch',
|
name: 'artistSearch',
|
||||||
value,
|
value,
|
||||||
placeholder: 'Search',
|
placeholder: 'Search',
|
||||||
autoComplete: 'off',
|
autoComplete: 'off',
|
||||||
|
@ -206,7 +206,7 @@ class ArtistSearchInput extends Component {
|
||||||
const theme = {
|
const theme = {
|
||||||
container: styles.container,
|
container: styles.container,
|
||||||
containerOpen: styles.containerOpen,
|
containerOpen: styles.containerOpen,
|
||||||
suggestionsContainer: styles.seriesContainer,
|
suggestionsContainer: styles.artistContainer,
|
||||||
suggestionsList: styles.list,
|
suggestionsList: styles.list,
|
||||||
suggestion: styles.listItem,
|
suggestion: styles.listItem,
|
||||||
suggestionHighlighted: styles.highlighted
|
suggestionHighlighted: styles.highlighted
|
||||||
|
@ -241,8 +241,8 @@ class ArtistSearchInput extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
ArtistSearchInput.propTypes = {
|
ArtistSearchInput.propTypes = {
|
||||||
series: PropTypes.arrayOf(PropTypes.object).isRequired,
|
artist: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
onGoToSeries: PropTypes.func.isRequired,
|
onGoToArtist: PropTypes.func.isRequired,
|
||||||
onGoToAddNewArtist: PropTypes.func.isRequired,
|
onGoToAddNewArtist: PropTypes.func.isRequired,
|
||||||
bindShortcut: PropTypes.func.isRequired
|
bindShortcut: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,9 +8,9 @@ import ArtistSearchInput from './ArtistSearchInput';
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
createAllArtistSelector(),
|
createAllArtistSelector(),
|
||||||
(series) => {
|
(artist) => {
|
||||||
return {
|
return {
|
||||||
series: _.sortBy(series, 'sortName')
|
artist: _.sortBy(artist, 'sortName')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -18,7 +18,7 @@ function createMapStateToProps() {
|
||||||
|
|
||||||
function createMapDispatchToProps(dispatch, props) {
|
function createMapDispatchToProps(dispatch, props) {
|
||||||
return {
|
return {
|
||||||
onGoToSeries(nameSlug) {
|
onGoToArtist(nameSlug) {
|
||||||
dispatch(push(`${window.Sonarr.urlBase}/artist/${nameSlug}`));
|
dispatch(push(`${window.Sonarr.urlBase}/artist/${nameSlug}`));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -28,18 +28,18 @@ function testLocalStorage() {
|
||||||
|
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state) => state.series,
|
(state) => state.artist,
|
||||||
(state) => state.tags,
|
(state) => state.tags,
|
||||||
(state) => state.settings,
|
(state) => state.settings,
|
||||||
(state) => state.app,
|
(state) => state.app,
|
||||||
createDimensionsSelector(),
|
createDimensionsSelector(),
|
||||||
(series, tags, settings, app, dimensions) => {
|
(artist, tags, settings, app, dimensions) => {
|
||||||
const isPopulated = series.isPopulated &&
|
const isPopulated = artist.isPopulated &&
|
||||||
tags.isPopulated &&
|
tags.isPopulated &&
|
||||||
settings.qualityProfiles.isPopulated &&
|
settings.qualityProfiles.isPopulated &&
|
||||||
settings.ui.isPopulated;
|
settings.ui.isPopulated;
|
||||||
|
|
||||||
const hasError = !!series.error ||
|
const hasError = !!artist.error ||
|
||||||
!!tags.error ||
|
!!tags.error ||
|
||||||
!!settings.qualityProfiles.error ||
|
!!settings.qualityProfiles.error ||
|
||||||
!!settings.ui.error;
|
!!settings.ui.error;
|
||||||
|
@ -47,7 +47,7 @@ function createMapStateToProps() {
|
||||||
return {
|
return {
|
||||||
isPopulated,
|
isPopulated,
|
||||||
hasError,
|
hasError,
|
||||||
seriesError: series.error,
|
artistError: artist.error,
|
||||||
tagsError: tags.error,
|
tagsError: tags.error,
|
||||||
qualityProfilesError: settings.qualityProfiles.error,
|
qualityProfilesError: settings.qualityProfiles.error,
|
||||||
uiSettingsError: settings.ui.error,
|
uiSettingsError: settings.ui.error,
|
||||||
|
|
|
@ -23,7 +23,7 @@ function getIconName(name) {
|
||||||
return icons.RSS;
|
return icons.RSS;
|
||||||
case 'SeasonSearch':
|
case 'SeasonSearch':
|
||||||
return icons.SEARCH;
|
return icons.SEARCH;
|
||||||
case 'SeriesSearch':
|
case 'ArtistSearch':
|
||||||
return icons.SEARCH;
|
return icons.SEARCH;
|
||||||
case 'UpdateSceneMapping':
|
case 'UpdateSceneMapping':
|
||||||
return icons.REFRESH;
|
return icons.REFRESH;
|
||||||
|
|
|
@ -22,7 +22,7 @@ const links = [
|
||||||
iconName: icons.ARTIST_CONTINUING,
|
iconName: icons.ARTIST_CONTINUING,
|
||||||
title: 'Artist',
|
title: 'Artist',
|
||||||
to: '/',
|
to: '/',
|
||||||
alias: '/series',
|
alias: '/artist',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: 'Add New',
|
title: 'Add New',
|
||||||
|
|
|
@ -132,8 +132,8 @@ class SignalRConnector extends Component {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name === 'series') {
|
if (name === 'artist') {
|
||||||
this.handleSeries(body);
|
this.handleArtist(body);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,9 +225,9 @@ class SignalRConnector extends Component {
|
||||||
this.props.fetchHealth();
|
this.props.fetchHealth();
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSeries = (body) => {
|
handleArtist = (body) => {
|
||||||
const action = body.action;
|
const action = body.action;
|
||||||
const section = 'series';
|
const section = 'artist';
|
||||||
|
|
||||||
if (action === 'updated') {
|
if (action === 'updated') {
|
||||||
this.props.updateItem({ section, ...body.resource });
|
this.props.updateItem({ section, ...body.resource });
|
||||||
|
|
|
@ -61,7 +61,7 @@ class EpisodeDetailsModalContent extends Component {
|
||||||
onModalClose
|
onModalClose
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const seriesLink = `/artist/${nameSlug}`;
|
const artistLink = `/artist/${nameSlug}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
@ -149,7 +149,7 @@ class EpisodeDetailsModalContent extends Component {
|
||||||
showOpenArtistButton &&
|
showOpenArtistButton &&
|
||||||
<Button
|
<Button
|
||||||
className={styles.openSeriesButton}
|
className={styles.openSeriesButton}
|
||||||
to={seriesLink}
|
to={artistLink}
|
||||||
onPress={onModalClose}
|
onPress={onModalClose}
|
||||||
>
|
>
|
||||||
Open Artist
|
Open Artist
|
||||||
|
|
|
@ -15,19 +15,17 @@ function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
createEpisodeSelector(),
|
createEpisodeSelector(),
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
(album, series) => {
|
(album, artist) => {
|
||||||
const {
|
const {
|
||||||
artistName,
|
artistName,
|
||||||
nameSlug,
|
nameSlug,
|
||||||
monitored: artistMonitored,
|
monitored: artistMonitored
|
||||||
seriesType
|
} = artist;
|
||||||
} = series;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
artistName,
|
artistName,
|
||||||
nameSlug,
|
nameSlug,
|
||||||
artistMonitored,
|
artistMonitored,
|
||||||
seriesType,
|
|
||||||
...album
|
...album
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,12 @@ function EpisodeNumber(props) {
|
||||||
sceneAbsoluteEpisodeNumber,
|
sceneAbsoluteEpisodeNumber,
|
||||||
unverifiedSceneNumbering,
|
unverifiedSceneNumbering,
|
||||||
alternateTitles,
|
alternateTitles,
|
||||||
seriesType
|
artistType
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const hasSceneInformation = sceneSeasonNumber !== undefined ||
|
const hasSceneInformation = sceneSeasonNumber !== undefined ||
|
||||||
sceneEpisodeNumber !== undefined ||
|
sceneEpisodeNumber !== undefined ||
|
||||||
(seriesType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined) ||
|
(artistType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined) ||
|
||||||
!!alternateTitles.length;
|
!!alternateTitles.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -33,7 +33,7 @@ function EpisodeNumber(props) {
|
||||||
{episodeNumber}
|
{episodeNumber}
|
||||||
|
|
||||||
{
|
{
|
||||||
seriesType === 'anime' && !!absoluteEpisodeNumber &&
|
artistType === 'anime' && !!absoluteEpisodeNumber &&
|
||||||
<span className={styles.absoluteEpisodeNumber}>
|
<span className={styles.absoluteEpisodeNumber}>
|
||||||
({absoluteEpisodeNumber})
|
({absoluteEpisodeNumber})
|
||||||
</span>
|
</span>
|
||||||
|
@ -47,7 +47,7 @@ function EpisodeNumber(props) {
|
||||||
sceneEpisodeNumber={sceneEpisodeNumber}
|
sceneEpisodeNumber={sceneEpisodeNumber}
|
||||||
sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
|
sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
|
||||||
alternateTitles={alternateTitles}
|
alternateTitles={alternateTitles}
|
||||||
seriesType={seriesType}
|
artistType={artistType}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
position={tooltipPositions.RIGHT}
|
position={tooltipPositions.RIGHT}
|
||||||
|
@ -56,7 +56,7 @@ function EpisodeNumber(props) {
|
||||||
{episodeNumber}
|
{episodeNumber}
|
||||||
|
|
||||||
{
|
{
|
||||||
seriesType === 'anime' && !!absoluteEpisodeNumber &&
|
artistType === 'anime' && !!absoluteEpisodeNumber &&
|
||||||
<span className={styles.absoluteEpisodeNumber}>
|
<span className={styles.absoluteEpisodeNumber}>
|
||||||
({absoluteEpisodeNumber})
|
({absoluteEpisodeNumber})
|
||||||
</span>
|
</span>
|
||||||
|
@ -75,7 +75,7 @@ function EpisodeNumber(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
seriesType === 'anime' && !absoluteEpisodeNumber &&
|
artistType === 'anime' && !absoluteEpisodeNumber &&
|
||||||
<Icon
|
<Icon
|
||||||
className={styles.warning}
|
className={styles.warning}
|
||||||
name={icons.WARNING}
|
name={icons.WARNING}
|
||||||
|
@ -96,7 +96,7 @@ EpisodeNumber.propTypes = {
|
||||||
sceneAbsoluteEpisodeNumber: PropTypes.number,
|
sceneAbsoluteEpisodeNumber: PropTypes.number,
|
||||||
unverifiedSceneNumbering: PropTypes.bool.isRequired,
|
unverifiedSceneNumbering: PropTypes.bool.isRequired,
|
||||||
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
|
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
seriesType: PropTypes.string
|
artistType: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
EpisodeNumber.defaultProps = {
|
EpisodeNumber.defaultProps = {
|
||||||
|
|
|
@ -13,7 +13,7 @@ function createMapStateToProps() {
|
||||||
(state, { sceneSeasonNumber }) => sceneSeasonNumber,
|
(state, { sceneSeasonNumber }) => sceneSeasonNumber,
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
createCommandsSelector(),
|
createCommandsSelector(),
|
||||||
(albumId, sceneSeasonNumber, series, commands) => {
|
(albumId, sceneSeasonNumber, artist, commands) => {
|
||||||
const isSearching = _.some(commands, (command) => {
|
const isSearching = _.some(commands, (command) => {
|
||||||
const episodeSearch = command.name === commandNames.EPISODE_SEARCH;
|
const episodeSearch = command.name === commandNames.EPISODE_SEARCH;
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ function createMapStateToProps() {
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
artistMonitored: series.monitored,
|
artistMonitored: artist.monitored,
|
||||||
seriesType: series.seriesType,
|
artistType: artist.artistType,
|
||||||
isSearching
|
isSearching
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ EpisodeTitleLink.propTypes = {
|
||||||
};
|
};
|
||||||
|
|
||||||
EpisodeTitleLink.defaultProps = {
|
EpisodeTitleLink.defaultProps = {
|
||||||
showSeriesButton: false
|
showArtistButton: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export default EpisodeTitleLink;
|
export default EpisodeTitleLink;
|
||||||
|
|
|
@ -10,7 +10,7 @@ function SceneInfo(props) {
|
||||||
sceneEpisodeNumber,
|
sceneEpisodeNumber,
|
||||||
sceneAbsoluteEpisodeNumber,
|
sceneAbsoluteEpisodeNumber,
|
||||||
alternateTitles,
|
alternateTitles,
|
||||||
seriesType
|
artistType
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -36,7 +36,7 @@ function SceneInfo(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
seriesType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined &&
|
artistType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined &&
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
titleClassName={styles.title}
|
titleClassName={styles.title}
|
||||||
descriptionClassName={styles.description}
|
descriptionClassName={styles.description}
|
||||||
|
@ -77,7 +77,7 @@ SceneInfo.propTypes = {
|
||||||
sceneEpisodeNumber: PropTypes.number,
|
sceneEpisodeNumber: PropTypes.number,
|
||||||
sceneAbsoluteEpisodeNumber: PropTypes.number,
|
sceneAbsoluteEpisodeNumber: PropTypes.number,
|
||||||
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
|
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
seriesType: PropTypes.string
|
artistType: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SceneInfo;
|
export default SceneInfo;
|
||||||
|
|
|
@ -9,16 +9,16 @@ function SeasonEpisodeNumber(props) {
|
||||||
episodeNumber,
|
episodeNumber,
|
||||||
absoluteEpisodeNumber,
|
absoluteEpisodeNumber,
|
||||||
airDate,
|
airDate,
|
||||||
seriesType
|
artistType
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
if (seriesType === 'daily' && airDate) {
|
if (artistType === 'daily' && airDate) {
|
||||||
return (
|
return (
|
||||||
<span>{airDate}</span>
|
<span>{airDate}</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seriesType === 'anime') {
|
if (artistType === 'anime') {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{seasonNumber}x{padNumber(episodeNumber, 2)}
|
{seasonNumber}x{padNumber(episodeNumber, 2)}
|
||||||
|
@ -45,7 +45,7 @@ SeasonEpisodeNumber.propTypes = {
|
||||||
episodeNumber: PropTypes.number.isRequired,
|
episodeNumber: PropTypes.number.isRequired,
|
||||||
absoluteEpisodeNumber: PropTypes.number,
|
absoluteEpisodeNumber: PropTypes.number,
|
||||||
airDate: PropTypes.string,
|
airDate: PropTypes.string,
|
||||||
seriesType: PropTypes.string
|
artistType: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SeasonEpisodeNumber;
|
export default SeasonEpisodeNumber;
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const QUALITY_PROFILE_SELECT = 'qualityProfileSelect';
|
||||||
export const LANGUAGE_PROFILE_SELECT = 'languageProfileSelect';
|
export const LANGUAGE_PROFILE_SELECT = 'languageProfileSelect';
|
||||||
export const ROOT_FOLDER_SELECT = 'rootFolderSelect';
|
export const ROOT_FOLDER_SELECT = 'rootFolderSelect';
|
||||||
export const SELECT = 'select';
|
export const SELECT = 'select';
|
||||||
export const SERIES_TYPE_SELECT = 'seriesTypeSelect';
|
export const SERIES_TYPE_SELECT = 'artistTypeSelect';
|
||||||
export const TAG = 'tag';
|
export const TAG = 'tag';
|
||||||
export const TEXT = 'text';
|
export const TEXT = 'text';
|
||||||
export const TEXT_TAG = 'textTag';
|
export const TEXT_TAG = 'textTag';
|
||||||
|
|
|
@ -14,14 +14,14 @@ function createMapStateToProps() {
|
||||||
(state) => state.organizePreview,
|
(state) => state.organizePreview,
|
||||||
(state) => state.settings.naming,
|
(state) => state.settings.naming,
|
||||||
createArtistSelector(),
|
createArtistSelector(),
|
||||||
(organizePreview, naming, series) => {
|
(organizePreview, naming, artist) => {
|
||||||
const props = { ...organizePreview };
|
const props = { ...organizePreview };
|
||||||
props.isFetching = organizePreview.isFetching || naming.isFetching;
|
props.isFetching = organizePreview.isFetching || naming.isFetching;
|
||||||
props.isPopulated = organizePreview.isPopulated && naming.isPopulated;
|
props.isPopulated = organizePreview.isPopulated && naming.isPopulated;
|
||||||
props.error = organizePreview.error || naming.error;
|
props.error = organizePreview.error || naming.error;
|
||||||
props.renameTracks = naming.item.renameTracks;
|
props.renameTracks = naming.item.renameTracks;
|
||||||
props.trackFormat = naming.item['standardTrackFormat'];
|
props.trackFormat = naming.item['standardTrackFormat'];
|
||||||
props.path = series.path;
|
props.path = artist.path;
|
||||||
|
|
||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ function EditRestrictionModalContent(props) {
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.TAG}
|
type={inputTypes.TAG}
|
||||||
name="tags"
|
name="tags"
|
||||||
helpText="Restrictions will apply to series at least one matching tag. Leave blank to apply to all series"
|
helpText="Restrictions will apply to artist at least one matching tag. Leave blank to apply to all artist"
|
||||||
{...tags}
|
{...tags}
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -154,7 +154,7 @@ function EditNotificationModalContent(props) {
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.TAG}
|
type={inputTypes.TAG}
|
||||||
name="tags"
|
name="tags"
|
||||||
helpText="Only send notifications for series with at least one matching tag"
|
helpText="Only send notifications for artist with at least one matching tag"
|
||||||
{...tags}
|
{...tags}
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -110,7 +110,7 @@ function EditDelayProfileModalContent(props) {
|
||||||
{
|
{
|
||||||
id === 1 ?
|
id === 1 ?
|
||||||
<Alert>
|
<Alert>
|
||||||
This is the default profile. It applies to all series that don't have an explicit profile.
|
This is the default profile. It applies to all artist that don't have an explicit profile.
|
||||||
</Alert> :
|
</Alert> :
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
|
@ -120,7 +120,7 @@ function EditDelayProfileModalContent(props) {
|
||||||
type={inputTypes.TAG}
|
type={inputTypes.TAG}
|
||||||
name="tags"
|
name="tags"
|
||||||
{...tags}
|
{...tags}
|
||||||
helpText="Applies to series with at least one matching tag"
|
helpText="Applies to artist with at least one matching tag"
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
|
@ -101,7 +101,7 @@ function EditLanguageProfileModalContent(props) {
|
||||||
id &&
|
id &&
|
||||||
<div
|
<div
|
||||||
className={styles.deleteButtonContainer}
|
className={styles.deleteButtonContainer}
|
||||||
title={isInUse && 'Can\'t delete a language profile that is attached to a series'}
|
title={isInUse && 'Can\'t delete a language profile that is attached to a artist'}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
kind={kinds.DANGER}
|
kind={kinds.DANGER}
|
||||||
|
|
|
@ -101,7 +101,7 @@ function EditQualityProfileModalContent(props) {
|
||||||
id &&
|
id &&
|
||||||
<div
|
<div
|
||||||
className={styles.deleteButtonContainer}
|
className={styles.deleteButtonContainer}
|
||||||
title={isInUse && 'Can\'t delete a quality profile that is attached to a series'}
|
title={isInUse && 'Can\'t delete a quality profile that is attached to a artist'}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
kind={kinds.DANGER}
|
kind={kinds.DANGER}
|
||||||
|
|
|
@ -87,7 +87,7 @@ function Settings() {
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<div className={styles.summary}>
|
<div className={styles.summary}>
|
||||||
Create metadata files when episodes are imported or series are refreshed
|
Create metadata files when episodes are imported or artist are refreshed
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
|
|
|
@ -68,7 +68,7 @@ const addArtistActionHandlers = {
|
||||||
|
|
||||||
promise.done((data) => {
|
promise.done((data) => {
|
||||||
dispatch(batchActions([
|
dispatch(batchActions([
|
||||||
updateItem({ section: 'series', ...data }),
|
updateItem({ section: 'artist', ...data }),
|
||||||
|
|
||||||
set({
|
set({
|
||||||
section,
|
section,
|
||||||
|
|
|
@ -17,31 +17,31 @@ const albumStudioActionHandlers = {
|
||||||
} = payload;
|
} = payload;
|
||||||
|
|
||||||
let monitoringOptions = null;
|
let monitoringOptions = null;
|
||||||
const series = [];
|
const artist = [];
|
||||||
const allArtists = getState().series.items;
|
const allArtists = getState().artist.items;
|
||||||
|
|
||||||
artistIds.forEach((id) => {
|
artistIds.forEach((id) => {
|
||||||
const s = _.find(allArtists, { id });
|
const s = _.find(allArtists, { id });
|
||||||
const seriesToUpdate = { id };
|
const artistToUpdate = { id };
|
||||||
|
|
||||||
if (payload.hasOwnProperty('monitored')) {
|
if (payload.hasOwnProperty('monitored')) {
|
||||||
seriesToUpdate.monitored = monitored;
|
artistToUpdate.monitored = monitored;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (monitor) {
|
if (monitor) {
|
||||||
const {
|
const {
|
||||||
seasons,
|
seasons,
|
||||||
options: seriesMonitoringOptions
|
options: artistMonitoringOptions
|
||||||
} = getMonitoringOptions(_.cloneDeep(s.seasons), monitor);
|
} = getMonitoringOptions(_.cloneDeep(s.seasons), monitor);
|
||||||
|
|
||||||
if (!monitoringOptions) {
|
if (!monitoringOptions) {
|
||||||
monitoringOptions = seriesMonitoringOptions;
|
monitoringOptions = artistMonitoringOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
seriesToUpdate.seasons = seasons;
|
artistToUpdate.seasons = seasons;
|
||||||
}
|
}
|
||||||
|
|
||||||
series.push(seriesToUpdate);
|
artist.push(artistToUpdate);
|
||||||
});
|
});
|
||||||
|
|
||||||
dispatch(set({
|
dispatch(set({
|
||||||
|
@ -53,7 +53,7 @@ const albumStudioActionHandlers = {
|
||||||
url: '/albumStudio',
|
url: '/albumStudio',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
series,
|
artist,
|
||||||
monitoringOptions
|
monitoringOptions
|
||||||
}),
|
}),
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
|
|
|
@ -7,7 +7,7 @@ import createSaveProviderHandler from './Creators/createSaveProviderHandler';
|
||||||
import createRemoveItemHandler from './Creators/createRemoveItemHandler';
|
import createRemoveItemHandler from './Creators/createRemoveItemHandler';
|
||||||
import { updateItem } from './baseActions';
|
import { updateItem } from './baseActions';
|
||||||
|
|
||||||
const section = 'series';
|
const section = 'artist';
|
||||||
|
|
||||||
const artistActionHandlers = {
|
const artistActionHandlers = {
|
||||||
[types.FETCH_ARTIST]: createFetchHandler(section, '/artist'),
|
[types.FETCH_ARTIST]: createFetchHandler(section, '/artist'),
|
||||||
|
@ -15,12 +15,12 @@ const artistActionHandlers = {
|
||||||
[types.SAVE_ARTIST]: createSaveProviderHandler(
|
[types.SAVE_ARTIST]: createSaveProviderHandler(
|
||||||
section,
|
section,
|
||||||
'/artist',
|
'/artist',
|
||||||
(state) => state.series),
|
(state) => state.artist),
|
||||||
|
|
||||||
[types.DELETE_ARTIST]: createRemoveItemHandler(
|
[types.DELETE_ARTIST]: createRemoveItemHandler(
|
||||||
section,
|
section,
|
||||||
'/artist',
|
'/artist',
|
||||||
(state) => state.series),
|
(state) => state.artist),
|
||||||
|
|
||||||
[types.TOGGLE_ARTIST_MONITORED]: function(payload) {
|
[types.TOGGLE_ARTIST_MONITORED]: function(payload) {
|
||||||
return function(dispatch, getState) {
|
return function(dispatch, getState) {
|
||||||
|
@ -29,7 +29,7 @@ const artistActionHandlers = {
|
||||||
monitored
|
monitored
|
||||||
} = payload;
|
} = payload;
|
||||||
|
|
||||||
const series = _.find(getState().series.items, { id });
|
const artist = _.find(getState().artist.items, { id });
|
||||||
|
|
||||||
dispatch(updateItem({
|
dispatch(updateItem({
|
||||||
id,
|
id,
|
||||||
|
@ -41,7 +41,7 @@ const artistActionHandlers = {
|
||||||
url: `/artist/${id}`,
|
url: `/artist/${id}`,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
...series,
|
...artist,
|
||||||
monitored
|
monitored
|
||||||
}),
|
}),
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
|
@ -74,8 +74,8 @@ const artistActionHandlers = {
|
||||||
monitored
|
monitored
|
||||||
} = payload;
|
} = payload;
|
||||||
|
|
||||||
const series = _.find(getState().series.items, { id });
|
const artist = _.find(getState().artist.items, { id });
|
||||||
const seasons = _.cloneDeep(series.seasons);
|
const seasons = _.cloneDeep(artist.seasons);
|
||||||
const season = _.find(seasons, { seasonNumber });
|
const season = _.find(seasons, { seasonNumber });
|
||||||
|
|
||||||
season.isSaving = true;
|
season.isSaving = true;
|
||||||
|
@ -92,7 +92,7 @@ const artistActionHandlers = {
|
||||||
url: `/artist/${id}`,
|
url: `/artist/${id}`,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
...series,
|
...artist,
|
||||||
seasons
|
seasons
|
||||||
}),
|
}),
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
|
@ -122,7 +122,7 @@ const artistActionHandlers = {
|
||||||
dispatch(updateItem({
|
dispatch(updateItem({
|
||||||
id,
|
id,
|
||||||
section,
|
section,
|
||||||
seasons: series.seasons
|
seasons: artist.seasons
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,12 +5,12 @@ import artistActionHandlers from './artistActionHandlers';
|
||||||
export const fetchArtist = artistActionHandlers[types.FETCH_ARTIST];
|
export const fetchArtist = artistActionHandlers[types.FETCH_ARTIST];
|
||||||
export const saveArtist = artistActionHandlers[types.SAVE_ARTIST];
|
export const saveArtist = artistActionHandlers[types.SAVE_ARTIST];
|
||||||
export const deleteArtist = artistActionHandlers[types.DELETE_ARTIST];
|
export const deleteArtist = artistActionHandlers[types.DELETE_ARTIST];
|
||||||
export const toggleSeriesMonitored = artistActionHandlers[types.TOGGLE_ARTIST_MONITORED];
|
export const toggleArtistMonitored = artistActionHandlers[types.TOGGLE_ARTIST_MONITORED];
|
||||||
export const toggleSeasonMonitored = artistActionHandlers[types.TOGGLE_ALBUM_MONITORED];
|
export const toggleSeasonMonitored = artistActionHandlers[types.TOGGLE_ALBUM_MONITORED];
|
||||||
|
|
||||||
export const setArtistValue = createAction(types.SET_ARTIST_VALUE, (payload) => {
|
export const setArtistValue = createAction(types.SET_ARTIST_VALUE, (payload) => {
|
||||||
return {
|
return {
|
||||||
section: 'series',
|
section: 'artist',
|
||||||
...payload
|
...payload
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,11 +22,11 @@ const artistEditorActionHandlers = {
|
||||||
|
|
||||||
promise.done((data) => {
|
promise.done((data) => {
|
||||||
dispatch(batchActions([
|
dispatch(batchActions([
|
||||||
...data.map((series) => {
|
...data.map((artist) => {
|
||||||
return updateItem({
|
return updateItem({
|
||||||
id: series.id,
|
id: artist.id,
|
||||||
section: 'series',
|
section: 'artist',
|
||||||
...series
|
...artist
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { batchActions } from 'redux-batched-actions';
|
||||||
import getNewSeries from 'Utilities/Series/getNewSeries';
|
import getNewSeries from 'Utilities/Series/getNewSeries';
|
||||||
import * as types from './actionTypes';
|
import * as types from './actionTypes';
|
||||||
import { set, updateItem, removeItem } from './baseActions';
|
import { set, updateItem, removeItem } from './baseActions';
|
||||||
import { startLookupSeries } from './importArtistActions';
|
import { startLookupArtist } from './importArtistActions';
|
||||||
import { fetchRootFolders } from './rootFolderActions';
|
import { fetchRootFolders } from './rootFolderActions';
|
||||||
|
|
||||||
const section = 'importArtist';
|
const section = 'importArtist';
|
||||||
|
@ -38,7 +38,7 @@ const importArtistActionHandlers = {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (term && term.length > 2) {
|
if (term && term.length > 2) {
|
||||||
dispatch(startLookupSeries());
|
dispatch(startLookupArtist());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -97,7 +97,7 @@ const importArtistActionHandlers = {
|
||||||
|
|
||||||
promise.always(() => {
|
promise.always(() => {
|
||||||
concurrentLookups--;
|
concurrentLookups--;
|
||||||
dispatch(startLookupSeries());
|
dispatch(startLookupArtist());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -114,8 +114,8 @@ const importArtistActionHandlers = {
|
||||||
const item = _.find(items, { id });
|
const item = _.find(items, { id });
|
||||||
const selectedArtist = item.selectedArtist;
|
const selectedArtist = item.selectedArtist;
|
||||||
|
|
||||||
// Make sure we have a selected series and
|
// Make sure we have a selected artist and
|
||||||
// the same series hasn't been added yet.
|
// the same artist hasn't been added yet.
|
||||||
if (selectedArtist && !_.some(acc, { foreignArtistId: selectedArtist.foreignArtistId })) {
|
if (selectedArtist && !_.some(acc, { foreignArtistId: selectedArtist.foreignArtistId })) {
|
||||||
const newSeries = getNewSeries(_.cloneDeep(selectedArtist), item);
|
const newSeries = getNewSeries(_.cloneDeep(selectedArtist), item);
|
||||||
newSeries.path = item.path;
|
newSeries.path = item.path;
|
||||||
|
@ -142,7 +142,7 @@ const importArtistActionHandlers = {
|
||||||
isImported: true
|
isImported: true
|
||||||
}),
|
}),
|
||||||
|
|
||||||
...data.map((series) => updateItem({ section: 'series', ...series })),
|
...data.map((artist) => updateItem({ section: 'artist', ...artist })),
|
||||||
|
|
||||||
...addedIds.map((id) => removeItem({ section, id }))
|
...addedIds.map((id) => removeItem({ section, id }))
|
||||||
]));
|
]));
|
||||||
|
|
|
@ -3,7 +3,7 @@ import * as types from './actionTypes';
|
||||||
import importArtistActionHandlers from './importArtistActionHandlers';
|
import importArtistActionHandlers from './importArtistActionHandlers';
|
||||||
|
|
||||||
export const queueLookupArtist = importArtistActionHandlers[types.QUEUE_LOOKUP_ARTIST];
|
export const queueLookupArtist = importArtistActionHandlers[types.QUEUE_LOOKUP_ARTIST];
|
||||||
export const startLookupSeries = importArtistActionHandlers[types.START_LOOKUP_ARTIST];
|
export const startLookupArtist = importArtistActionHandlers[types.START_LOOKUP_ARTIST];
|
||||||
export const importArtist = importArtistActionHandlers[types.IMPORT_ARTIST];
|
export const importArtist = importArtistActionHandlers[types.IMPORT_ARTIST];
|
||||||
export const clearImportArtist = createAction(types.CLEAR_IMPORT_ARTIST);
|
export const clearImportArtist = createAction(types.CLEAR_IMPORT_ARTIST);
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ export const defaultState = {
|
||||||
monitor: 'allEpisodes',
|
monitor: 'allEpisodes',
|
||||||
qualityProfileId: 0,
|
qualityProfileId: 0,
|
||||||
languageProfileId: 0,
|
languageProfileId: 0,
|
||||||
seriesType: 'standard',
|
|
||||||
primaryAlbumTypes: ['Album'],
|
primaryAlbumTypes: ['Album'],
|
||||||
secondaryAlbumTypes: ['Studio'],
|
secondaryAlbumTypes: ['Studio'],
|
||||||
albumFolder: true,
|
albumFolder: true,
|
||||||
|
|
|
@ -20,7 +20,7 @@ export const defaultState = {
|
||||||
pendingChanges: {}
|
pendingChanges: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
const reducerSection = 'series';
|
const reducerSection = 'artist';
|
||||||
|
|
||||||
const artistReducers = handleActions({
|
const artistReducers = handleActions({
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const defaultState = {
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
name: 'series.sortName',
|
name: 'artist.sortName',
|
||||||
label: 'Artist Name',
|
label: 'Artist Name',
|
||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: true
|
isVisible: true
|
||||||
|
|
|
@ -2,9 +2,9 @@ import { combineReducers } from 'redux';
|
||||||
import { enableBatching } from 'redux-batched-actions';
|
import { enableBatching } from 'redux-batched-actions';
|
||||||
import { routerReducer } from 'react-router-redux';
|
import { routerReducer } from 'react-router-redux';
|
||||||
import app, { defaultState as defaultappState } from './appReducers';
|
import app, { defaultState as defaultappState } from './appReducers';
|
||||||
import addArtist, { defaultState as defaultAddSeriesState } from './addArtistReducers';
|
import addArtist, { defaultState as defaultAddArtistState } from './addArtistReducers';
|
||||||
import importArtist, { defaultState as defaultImportArtistState } from './importArtistReducers';
|
import importArtist, { defaultState as defaultImportArtistState } from './importArtistReducers';
|
||||||
import series, { defaultState as defaultArtistState } from './artistReducers';
|
import artist, { defaultState as defaultArtistState } from './artistReducers';
|
||||||
import artistIndex, { defaultState as defaultArtistIndexState } from './artistIndexReducers';
|
import artistIndex, { defaultState as defaultArtistIndexState } from './artistIndexReducers';
|
||||||
import artistEditor, { defaultState as defaultArtistEditorState } from './artistEditorReducers';
|
import artistEditor, { defaultState as defaultArtistEditorState } from './artistEditorReducers';
|
||||||
import albumStudio, { defaultState as defaultAlbumStudioState } from './albumStudioReducers';
|
import albumStudio, { defaultState as defaultAlbumStudioState } from './albumStudioReducers';
|
||||||
|
@ -31,9 +31,9 @@ import organizePreview, { defaultState as defaultOrganizePreviewState } from './
|
||||||
|
|
||||||
export const defaultState = {
|
export const defaultState = {
|
||||||
app: defaultappState,
|
app: defaultappState,
|
||||||
addArtist: defaultAddSeriesState,
|
addArtist: defaultAddArtistState,
|
||||||
importArtist: defaultImportArtistState,
|
importArtist: defaultImportArtistState,
|
||||||
series: defaultArtistState,
|
artist: defaultArtistState,
|
||||||
artistIndex: defaultArtistIndexState,
|
artistIndex: defaultArtistIndexState,
|
||||||
artistEditor: defaultArtistEditorState,
|
artistEditor: defaultArtistEditorState,
|
||||||
albumStudio: defaultAlbumStudioState,
|
albumStudio: defaultAlbumStudioState,
|
||||||
|
@ -63,7 +63,7 @@ export default enableBatching(combineReducers({
|
||||||
app,
|
app,
|
||||||
addArtist,
|
addArtist,
|
||||||
importArtist,
|
importArtist,
|
||||||
series,
|
artist,
|
||||||
artistIndex,
|
artistIndex,
|
||||||
artistEditor,
|
artistEditor,
|
||||||
albumStudio,
|
albumStudio,
|
||||||
|
|
|
@ -19,10 +19,10 @@ export const defaultState = {
|
||||||
recentFolders: [],
|
recentFolders: [],
|
||||||
importMode: 'move',
|
importMode: 'move',
|
||||||
sortPredicates: {
|
sortPredicates: {
|
||||||
series: function(item, direction) {
|
artist: function(item, direction) {
|
||||||
const series = item.series;
|
const artist = item.artist;
|
||||||
|
|
||||||
return series ? series.sortName : '';
|
return artist ? artist.sortName : '';
|
||||||
},
|
},
|
||||||
|
|
||||||
quality: function(item, direction) {
|
quality: function(item, direction) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ export const defaultState = {
|
||||||
isModifiable: false
|
isModifiable: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'series.sortName',
|
name: 'artist.sortName',
|
||||||
label: 'Artist',
|
label: 'Artist',
|
||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: true
|
isVisible: true
|
||||||
|
|
|
@ -71,7 +71,7 @@ export const defaultState = {
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
name: 'series.sortName',
|
name: 'artist.sortName',
|
||||||
label: 'Artist Name',
|
label: 'Artist Name',
|
||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: true
|
isVisible: true
|
||||||
|
|
|
@ -2,9 +2,9 @@ import { createSelector } from 'reselect';
|
||||||
|
|
||||||
function createAllArtistSelector() {
|
function createAllArtistSelector() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state) => state.series,
|
(state) => state.artist,
|
||||||
(series) => {
|
(artist) => {
|
||||||
return series.items;
|
return artist.items;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ function createArtistSelector() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state, { artistId }) => artistId,
|
(state, { artistId }) => artistId,
|
||||||
createAllArtistSelector(),
|
createAllArtistSelector(),
|
||||||
(artistId, series) => {
|
(artistId, artist) => {
|
||||||
return _.find(series, { id: artistId });
|
return _.find(artist, { id: artistId });
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ function createExistingArtistSelector() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state, { foreignArtistId }) => foreignArtistId,
|
(state, { foreignArtistId }) => foreignArtistId,
|
||||||
createAllArtistSelector(),
|
createAllArtistSelector(),
|
||||||
(foreignArtistId, series) => {
|
(foreignArtistId, artist) => {
|
||||||
return _.some(series, { foreignArtistId });
|
return _.some(artist, { foreignArtistId });
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,16 +8,15 @@ function createImportArtistItemSelector() {
|
||||||
(state) => state.addArtist,
|
(state) => state.addArtist,
|
||||||
(state) => state.importArtist,
|
(state) => state.importArtist,
|
||||||
createAllArtistSelector(),
|
createAllArtistSelector(),
|
||||||
(id, addArtist, importArtist, series) => {
|
(id, addArtist, importArtist, artist) => {
|
||||||
const item = _.find(importArtist.items, { id }) || {};
|
const item = _.find(importArtist.items, { id }) || {};
|
||||||
const selectedArtist = item && item.selectedArtist;
|
const selectedArtist = item && item.selectedArtist;
|
||||||
const isExistingArtist = !!selectedArtist && _.some(series, { foreignArtistId: selectedArtist.foreignArtistId });
|
const isExistingArtist = !!selectedArtist && _.some(artist, { foreignArtistId: selectedArtist.foreignArtistId });
|
||||||
|
|
||||||
return {
|
return {
|
||||||
defaultMonitor: addArtist.defaults.monitor,
|
defaultMonitor: addArtist.defaults.monitor,
|
||||||
defaultQualityProfileId: addArtist.defaults.qualityProfileId,
|
defaultQualityProfileId: addArtist.defaults.qualityProfileId,
|
||||||
defaultSeriesType: addArtist.defaults.seriesType,
|
defaultAlbumFolder: addArtist.defaults.albumFolder,
|
||||||
defaultSeasonFolder: addArtist.defaults.albumFolder,
|
|
||||||
...item,
|
...item,
|
||||||
isExistingArtist
|
isExistingArtist
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,12 +6,12 @@ function createProfileInUseSelector(profileProp) {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state, { id }) => id,
|
(state, { id }) => id,
|
||||||
createAllArtistSelector(),
|
createAllArtistSelector(),
|
||||||
(id, series) => {
|
(id, artist) => {
|
||||||
if (!id) {
|
if (!id) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _.some(series, { [profileProp]: id });
|
return _.some(artist, { [profileProp]: id });
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ function createMapStateToProps() {
|
||||||
trackFiles,
|
trackFiles,
|
||||||
languageProfilesSchema,
|
languageProfilesSchema,
|
||||||
qualityProfileSchema,
|
qualityProfileSchema,
|
||||||
series
|
artist
|
||||||
) => {
|
) => {
|
||||||
const filtered = _.filter(tracks.items, (track) => {
|
const filtered = _.filter(tracks.items, (track) => {
|
||||||
if (albumId >= 0 && track.albumId !== albumId) {
|
if (albumId >= 0 && track.albumId !== albumId) {
|
||||||
|
@ -56,7 +56,7 @@ function createMapStateToProps() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
items,
|
items,
|
||||||
seriesType: series.seriesType,
|
artistType: artist.artistType,
|
||||||
isDeleting: trackFiles.isDeleting,
|
isDeleting: trackFiles.isDeleting,
|
||||||
isSaving: trackFiles.isSaving,
|
isSaving: trackFiles.isSaving,
|
||||||
languages,
|
languages,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import getMonitoringOptions from 'Utilities/Series/getMonitoringOptions';
|
import getMonitoringOptions from 'Utilities/Series/getMonitoringOptions';
|
||||||
|
|
||||||
function getNewSeries(series, payload) {
|
function getNewSeries(artist, payload) {
|
||||||
const {
|
const {
|
||||||
rootFolderPath,
|
rootFolderPath,
|
||||||
monitor,
|
monitor,
|
||||||
|
@ -17,22 +17,22 @@ function getNewSeries(series, payload) {
|
||||||
// const {
|
// const {
|
||||||
// seasons,
|
// seasons,
|
||||||
// options: addOptions
|
// options: addOptions
|
||||||
// } = getMonitoringOptions(series.seasons, monitor);
|
// } = getMonitoringOptions(artist.seasons, monitor);
|
||||||
|
|
||||||
// addOptions.searchForMissingAlbums = searchForMissingAlbums;
|
// addOptions.searchForMissingAlbums = searchForMissingAlbums;
|
||||||
// series.addOptions = addOptions;
|
// artist.addOptions = addOptions;
|
||||||
// series.seasons = seasons;
|
// artist.seasons = seasons;
|
||||||
series.monitored = true;
|
artist.monitored = true;
|
||||||
series.qualityProfileId = qualityProfileId;
|
artist.qualityProfileId = qualityProfileId;
|
||||||
series.languageProfileId = languageProfileId;
|
artist.languageProfileId = languageProfileId;
|
||||||
series.rootFolderPath = rootFolderPath;
|
artist.rootFolderPath = rootFolderPath;
|
||||||
series.artistType = artistType;
|
artist.artistType = artistType;
|
||||||
series.albumFolder = albumFolder;
|
artist.albumFolder = albumFolder;
|
||||||
series.primaryAlbumTypes = primaryAlbumTypes;
|
artist.primaryAlbumTypes = primaryAlbumTypes;
|
||||||
series.secondaryAlbumTypes = secondaryAlbumTypes;
|
artist.secondaryAlbumTypes = secondaryAlbumTypes;
|
||||||
series.tags = tags;
|
artist.tags = tags;
|
||||||
|
|
||||||
return series;
|
return artist;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default getNewSeries;
|
export default getNewSeries;
|
||||||
|
|
|
@ -17,7 +17,7 @@ function CutoffUnmetRow(props) {
|
||||||
const {
|
const {
|
||||||
id,
|
id,
|
||||||
trackFileId,
|
trackFileId,
|
||||||
series,
|
artist,
|
||||||
seasonNumber,
|
seasonNumber,
|
||||||
episodeNumber,
|
episodeNumber,
|
||||||
absoluteEpisodeNumber,
|
absoluteEpisodeNumber,
|
||||||
|
@ -50,12 +50,12 @@ function CutoffUnmetRow(props) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name === 'series.sortName') {
|
if (name === 'artist.sortName') {
|
||||||
return (
|
return (
|
||||||
<TableRowCell key={name}>
|
<TableRowCell key={name}>
|
||||||
<ArtistNameLink
|
<ArtistNameLink
|
||||||
titleSlug={series.titleSlug}
|
titleSlug={artist.titleSlug}
|
||||||
title={series.title}
|
title={artist.title}
|
||||||
/>
|
/>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
);
|
);
|
||||||
|
@ -71,7 +71,7 @@ function CutoffUnmetRow(props) {
|
||||||
seasonNumber={seasonNumber}
|
seasonNumber={seasonNumber}
|
||||||
episodeNumber={episodeNumber}
|
episodeNumber={episodeNumber}
|
||||||
absoluteEpisodeNumber={absoluteEpisodeNumber}
|
absoluteEpisodeNumber={absoluteEpisodeNumber}
|
||||||
seriesType={series.seriesType}
|
artistType={artist.artistType}
|
||||||
sceneSeasonNumber={sceneSeasonNumber}
|
sceneSeasonNumber={sceneSeasonNumber}
|
||||||
sceneEpisodeNumber={sceneEpisodeNumber}
|
sceneEpisodeNumber={sceneEpisodeNumber}
|
||||||
sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
|
sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
|
||||||
|
@ -85,7 +85,7 @@ function CutoffUnmetRow(props) {
|
||||||
<TableRowCell key={name}>
|
<TableRowCell key={name}>
|
||||||
<EpisodeTitleLink
|
<EpisodeTitleLink
|
||||||
albumId={id}
|
albumId={id}
|
||||||
artistId={series.id}
|
artistId={artist.id}
|
||||||
episodeEntity={episodeEntities.WANTED_CUTOFF_UNMET}
|
episodeEntity={episodeEntities.WANTED_CUTOFF_UNMET}
|
||||||
episodeTitle={title}
|
episodeTitle={title}
|
||||||
showOpenArtistButton={true}
|
showOpenArtistButton={true}
|
||||||
|
@ -136,7 +136,7 @@ function CutoffUnmetRow(props) {
|
||||||
<EpisodeSearchCellConnector
|
<EpisodeSearchCellConnector
|
||||||
key={name}
|
key={name}
|
||||||
albumId={id}
|
albumId={id}
|
||||||
artistId={series.id}
|
artistId={artist.id}
|
||||||
episodeTitle={title}
|
episodeTitle={title}
|
||||||
episodeEntity={episodeEntities.WANTED_CUTOFF_UNMET}
|
episodeEntity={episodeEntities.WANTED_CUTOFF_UNMET}
|
||||||
showOpenArtistButton={true}
|
showOpenArtistButton={true}
|
||||||
|
@ -154,7 +154,7 @@ function CutoffUnmetRow(props) {
|
||||||
CutoffUnmetRow.propTypes = {
|
CutoffUnmetRow.propTypes = {
|
||||||
id: PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
trackFileId: PropTypes.number,
|
trackFileId: PropTypes.number,
|
||||||
series: PropTypes.object.isRequired,
|
artist: PropTypes.object.isRequired,
|
||||||
seasonNumber: PropTypes.number.isRequired,
|
seasonNumber: PropTypes.number.isRequired,
|
||||||
episodeNumber: PropTypes.number.isRequired,
|
episodeNumber: PropTypes.number.isRequired,
|
||||||
absoluteEpisodeNumber: PropTypes.number,
|
absoluteEpisodeNumber: PropTypes.number,
|
||||||
|
|
|
@ -17,12 +17,6 @@ function MissingRow(props) {
|
||||||
id,
|
id,
|
||||||
// trackFileId,
|
// trackFileId,
|
||||||
artist,
|
artist,
|
||||||
// seasonNumber,
|
|
||||||
// episodeNumber,
|
|
||||||
// absoluteEpisodeNumber,
|
|
||||||
// sceneSeasonNumber,
|
|
||||||
// sceneEpisodeNumber,
|
|
||||||
// sceneAbsoluteEpisodeNumber,
|
|
||||||
releaseDate,
|
releaseDate,
|
||||||
title,
|
title,
|
||||||
isSelected,
|
isSelected,
|
||||||
|
@ -70,7 +64,6 @@ function MissingRow(props) {
|
||||||
// seasonNumber={seasonNumber}
|
// seasonNumber={seasonNumber}
|
||||||
// episodeNumber={episodeNumber}
|
// episodeNumber={episodeNumber}
|
||||||
// absoluteEpisodeNumber={absoluteEpisodeNumber}
|
// absoluteEpisodeNumber={absoluteEpisodeNumber}
|
||||||
// seriesType={series.seriesType}
|
|
||||||
// sceneSeasonNumber={sceneSeasonNumber}
|
// sceneSeasonNumber={sceneSeasonNumber}
|
||||||
// sceneEpisodeNumber={sceneEpisodeNumber}
|
// sceneEpisodeNumber={sceneEpisodeNumber}
|
||||||
// sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
|
// sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
|
||||||
|
@ -141,12 +134,6 @@ MissingRow.propTypes = {
|
||||||
id: PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
// trackFileId: PropTypes.number,
|
// trackFileId: PropTypes.number,
|
||||||
artist: PropTypes.object.isRequired,
|
artist: PropTypes.object.isRequired,
|
||||||
// seasonNumber: PropTypes.number.isRequired,
|
|
||||||
// episodeNumber: PropTypes.number.isRequired,
|
|
||||||
// absoluteEpisodeNumber: PropTypes.number,
|
|
||||||
// sceneSeasonNumber: PropTypes.number,
|
|
||||||
// sceneEpisodeNumber: PropTypes.number,
|
|
||||||
// sceneAbsoluteEpisodeNumber: PropTypes.number,
|
|
||||||
releaseDate: PropTypes.string.isRequired,
|
releaseDate: PropTypes.string.isRequired,
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
isSelected: PropTypes.bool,
|
isSelected: PropTypes.bool,
|
||||||
|
|
|
@ -42,13 +42,13 @@ namespace Lidarr.Api.V3.Albums
|
||||||
return MapToResource(_albumService.GetAlbumsByArtist(artistId), false);
|
return MapToResource(_albumService.GetAlbumsByArtist(artistId), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
string episodeIdsValue = albumIdsQuery.Value.ToString();
|
string albumIdsValue = albumIdsQuery.Value.ToString();
|
||||||
|
|
||||||
var episodeIds = episodeIdsValue.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
|
var albumIds = albumIdsValue.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Select(e => Convert.ToInt32(e))
|
.Select(e => Convert.ToInt32(e))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
return MapToResource(_albumService.GetAlbums(episodeIds), false);
|
return MapToResource(_albumService.GetAlbums(albumIds), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Response SetAlbumMonitored(int id)
|
private Response SetAlbumMonitored(int id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue