More UI Cleanup

pull/94/head
Qstick 7 years ago
parent 9c88c2006d
commit 1700c471b7

@ -40,7 +40,7 @@ class BlacklistRow extends Component {
render() {
const {
series,
artist,
sourceTitle,
language,
quality,
@ -64,12 +64,12 @@ class BlacklistRow extends Component {
return null;
}
if (name === 'series.sortName') {
if (name === 'artist.sortName') {
return (
<TableRowCell key={name}>
<ArtistNameLink
nameSlug={series.nameSlug}
artistName={series.artistName}
nameSlug={artist.nameSlug}
artistName={artist.artistName}
/>
</TableRowCell>
);
@ -163,7 +163,7 @@ class BlacklistRow extends Component {
BlacklistRow.propTypes = {
id: PropTypes.number.isRequired,
series: PropTypes.object.isRequired,
artist: PropTypes.object.isRequired,
sourceTitle: PropTypes.string.isRequired,
language: PropTypes.object.isRequired,
quality: PropTypes.object.isRequired,

@ -6,9 +6,9 @@ import BlacklistRow from './BlacklistRow';
function createMapStateToProps() {
return createSelector(
createArtistSelector(),
(series) => {
(artist) => {
return {
series
artist
};
}
);

@ -9,7 +9,7 @@ function getIconName(eventType) {
switch (eventType) {
case 'grabbed':
return icons.DOWNLOADING;
case 'seriesFolderImported':
case 'artistFolderImported':
return icons.DRIVE;
case 'downloadFolderImported':
return icons.DOWNLOADED;
@ -37,7 +37,7 @@ function getTooltip(eventType, data) {
switch (eventType) {
case 'grabbed':
return `Album grabbed from ${data.indexer} and sent to ${data.downloadClient}`;
case 'seriesFolderImported':
case 'artistFolderImported':
return 'Track imported from artist folder';
case 'downloadFolderImported':
return 'Track downloaded successfully and picked up from download client';

@ -68,7 +68,7 @@ class QueueRow extends Component {
trackedDownloadStatus,
statusMessages,
errorMessage,
series,
artist,
episode,
quality,
protocol,
@ -131,23 +131,23 @@ class QueueRow extends Component {
);
}
if (name === 'series.sortName') {
if (name === 'artist.sortName') {
return (
<TableRowCell key={name}>
<ArtistNameLink
nameSlug={series.nameSlug}
artistName={series.artistName}
nameSlug={artist.nameSlug}
artistName={artist.artistName}
/>
</TableRowCell>
);
}
if (name === 'series') {
if (name === 'artist') {
return (
<TableRowCell key={name}>
<ArtistNameLink
nameSlug={series.nameSlug}
artistName={series.artistName}
nameSlug={artist.nameSlug}
artistName={artist.artistName}
/>
</TableRowCell>
);
@ -158,7 +158,7 @@ class QueueRow extends Component {
<TableRowCell key={name}>
<EpisodeTitleLink
albumId={episode.id}
artistId={series.id}
artistId={artist.id}
trackFileId={episode.trackFileId}
episodeTitle={episode.title}
showOpenArtistButton={true}
@ -300,7 +300,7 @@ QueueRow.propTypes = {
trackedDownloadStatus: PropTypes.string,
statusMessages: PropTypes.arrayOf(PropTypes.object),
errorMessage: PropTypes.string,
series: PropTypes.object.isRequired,
artist: PropTypes.object.isRequired,
episode: PropTypes.object.isRequired,
quality: PropTypes.object.isRequired,
protocol: PropTypes.string.isRequired,

@ -14,14 +14,14 @@ function createMapStateToProps() {
createArtistSelector(),
createEpisodeSelector(),
createUISettingsSelector(),
(series, episode, uiSettings) => {
(artist, episode, uiSettings) => {
const result = _.pick(uiSettings, [
'showRelativeDates',
'shortDateFormat',
'timeFormat'
]);
result.series = series;
result.artist = artist;
result.episode = episode;
return result;

@ -146,7 +146,7 @@ class AddNewArtist extends Component {
<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>
<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?
</Link>
</div>

@ -15,7 +15,6 @@ import ModalFooter from 'Components/Modal/ModalFooter';
import Popover from 'Components/Tooltip/Popover';
import ArtistPoster from 'Artist/ArtistPoster';
import ArtistMonitoringOptionsPopoverContent from 'AddArtist/ArtistMonitoringOptionsPopoverContent';
// import SeriesTypePopoverContent from 'AddArtist/SeriesTypePopoverContent';
import styles from './AddNewArtistModalContent.css';
class AddNewArtistModalContent extends Component {

@ -116,7 +116,7 @@ class ImportArtist extends Component {
{
!rootFoldersError && rootFoldersPopulated && !unmappedFolders.length &&
<div>
All series in {path} have been imported
All artist in {path} have been imported
</div>
}

@ -23,15 +23,13 @@ class ImportArtistFooter extends Component {
defaultMonitor,
defaultQualityProfileId,
defaultLanguageProfileId,
defaultAlbumFolder,
defaultSeriesType
defaultAlbumFolder
} = props;
this.state = {
monitor: defaultMonitor,
qualityProfileId: defaultQualityProfileId,
languageProfileId: defaultLanguageProfileId,
seriesType: defaultSeriesType,
albumFolder: defaultAlbumFolder
};
}
@ -41,12 +39,10 @@ class ImportArtistFooter extends Component {
defaultMonitor,
defaultQualityProfileId,
defaultLanguageProfileId,
// defaultSeriesType,
defaultAlbumFolder,
isMonitorMixed,
isQualityProfileIdMixed,
isLanguageProfileIdMixed,
// isSeriesTypeMixed,
isAlbumFolderMixed
} = this.props;
@ -54,7 +50,6 @@ class ImportArtistFooter extends Component {
monitor,
qualityProfileId,
languageProfileId,
// seriesType,
albumFolder
} = this.state;
@ -108,7 +103,6 @@ class ImportArtistFooter extends Component {
isMonitorMixed,
isQualityProfileIdMixed,
isLanguageProfileIdMixed,
// isSeriesTypeMixed,
showLanguageProfile,
onImportPress
} = this.props;
@ -117,7 +111,6 @@ class ImportArtistFooter extends Component {
monitor,
qualityProfileId,
languageProfileId,
// seriesType,
albumFolder
} = this.state;
@ -227,12 +220,10 @@ ImportArtistFooter.propTypes = {
defaultMonitor: PropTypes.string.isRequired,
defaultQualityProfileId: PropTypes.number,
defaultLanguageProfileId: PropTypes.number,
defaultSeriesType: PropTypes.string.isRequired,
defaultAlbumFolder: PropTypes.bool.isRequired,
isMonitorMixed: PropTypes.bool.isRequired,
isQualityProfileIdMixed: PropTypes.bool.isRequired,
isLanguageProfileIdMixed: PropTypes.bool.isRequired,
// isSeriesTypeMixed: PropTypes.bool.isRequired,
isAlbumFolderMixed: PropTypes.bool.isRequired,
showLanguageProfile: PropTypes.bool.isRequired,
onInputChange: PropTypes.func.isRequired,

@ -4,8 +4,8 @@ import { createSelector } from 'reselect';
import ImportArtistFooter from './ImportArtistFooter';
function isMixed(items, selectedIds, defaultValue, key) {
return _.some(items, (series) => {
return selectedIds.indexOf(series.id) > -1 && series[key] !== defaultValue;
return _.some(items, (artist) => {
return selectedIds.indexOf(artist.id) > -1 && artist[key] !== defaultValue;
});
}
@ -19,20 +19,18 @@ function createMapStateToProps() {
monitor: defaultMonitor,
qualityProfileId: defaultQualityProfileId,
languageProfileId: defaultLanguageProfileId,
seriesType: defaultSeriesType,
albumFolder: defaultAlbumFolder
} = addArtist.defaults;
const items = importArtist.items;
const isLookingUpArtist = _.some(importArtist.items, (series) => {
return !series.isPopulated && series.error == null;
const isLookingUpArtist = _.some(importArtist.items, (artist) => {
return !artist.isPopulated && artist.error == null;
});
const isMonitorMixed = isMixed(items, selectedIds, defaultMonitor, 'monitor');
const isQualityProfileIdMixed = isMixed(items, selectedIds, defaultQualityProfileId, 'qualityProfileId');
const isLanguageProfileIdMixed = isMixed(items, selectedIds, defaultLanguageProfileId, 'languageProfileId');
const isSeriesTypeMixed = isMixed(items, selectedIds, defaultSeriesType, 'seriesType');
const isAlbumFolderMixed = isMixed(items, selectedIds, defaultAlbumFolder, 'albumFolder');
return {
@ -42,12 +40,10 @@ function createMapStateToProps() {
defaultMonitor,
defaultQualityProfileId,
defaultLanguageProfileId,
defaultSeriesType,
defaultAlbumFolder,
isMonitorMixed,
isQualityProfileIdMixed,
isLanguageProfileIdMixed,
isSeriesTypeMixed,
isAlbumFolderMixed
};
}

@ -19,13 +19,6 @@
min-width: 170px;
}
.seriesType {
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
flex: 0 1 200px;
min-width: 120px;
}
.albumFolder {
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';

@ -78,7 +78,7 @@ function ImportArtistHeader(props) {
<VirtualTableHeaderCell
className={styles.artist}
name="series"
name="artist"
>
Artist
</VirtualTableHeaderCell>

@ -24,13 +24,6 @@
min-width: 170px;
}
.seriesType {
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
flex: 0 1 200px;
min-width: 120px;
}
.albumFolder {
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
@ -38,7 +31,7 @@
min-width: 120px;
}
.series {
.artist {
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
flex: 0 1 400px;

@ -16,7 +16,6 @@ function ImportArtistRow(props) {
qualityProfileId,
languageProfileId,
albumFolder,
// seriesType,
selectedArtist,
isExistingArtist,
showLanguageProfile,
@ -77,7 +76,7 @@ function ImportArtistRow(props) {
/>
</VirtualTableRowCell>
<VirtualTableRowCell className={styles.series}>
<VirtualTableRowCell className={styles.artist}>
<ImportArtistSelectArtistConnector
id={id}
isExistingArtist={isExistingArtist}
@ -93,7 +92,6 @@ ImportArtistRow.propTypes = {
monitor: PropTypes.string.isRequired,
qualityProfileId: PropTypes.number.isRequired,
languageProfileId: PropTypes.number.isRequired,
// seriesType: PropTypes.string.isRequired,
albumFolder: PropTypes.bool.isRequired,
selectedArtist: PropTypes.object,
isExistingArtist: PropTypes.bool.isRequired,

@ -21,9 +21,9 @@ function createMapStateToProps() {
return createSelector(
createImportArtistItemSelector(),
createAllArtistSelector(),
(item, series) => {
(item, artist) => {
const selectedArtist = item && item.selectedArtist;
const isExistingArtist = !!selectedArtist && _.some(series, { foreignArtistId: selectedArtist.foreignArtistId });
const isExistingArtist = !!selectedArtist && _.some(artist, { foreignArtistId: selectedArtist.foreignArtistId });
return {
...item,
@ -59,7 +59,6 @@ class ImportArtistRowConnector extends Component {
const {
items,
monitor,
// seriesType,
albumFolder
} = this.props;
@ -81,7 +80,6 @@ ImportArtistRowConnector.propTypes = {
rootFolderId: PropTypes.number.isRequired,
id: PropTypes.string.isRequired,
monitor: PropTypes.string,
// seriesType: PropTypes.string,
albumFolder: PropTypes.bool,
items: PropTypes.arrayOf(PropTypes.object),
queueLookupArtist: PropTypes.func.isRequired,

@ -22,9 +22,8 @@ class ImportArtistTable extends Component {
defaultMonitor,
defaultQualityProfileId,
defaultLanguageProfileId,
defaultSeriesType,
defaultAlbumFolder,
onSeriesLookup,
onArtistLookup,
onSetImportArtistValue
} = this.props;
@ -32,14 +31,13 @@ class ImportArtistTable extends Component {
monitor: defaultMonitor,
qualityProfileId: defaultQualityProfileId,
languageProfileId: defaultLanguageProfileId,
seriesType: defaultSeriesType,
albumFolder: defaultAlbumFolder
};
unmappedFolders.forEach((unmappedFolder) => {
const id = unmappedFolder.name;
onSeriesLookup(id, unmappedFolder.path);
onArtistLookup(id, unmappedFolder.path);
onSetImportArtistValue({
id,
@ -192,7 +190,6 @@ ImportArtistTable.propTypes = {
defaultMonitor: PropTypes.string.isRequired,
defaultQualityProfileId: PropTypes.number,
defaultLanguageProfileId: PropTypes.number,
defaultSeriesType: PropTypes.string.isRequired,
defaultAlbumFolder: PropTypes.bool.isRequired,
allSelected: PropTypes.bool.isRequired,
allUnselected: PropTypes.bool.isRequired,
@ -205,7 +202,7 @@ ImportArtistTable.propTypes = {
onSelectAllChange: PropTypes.func.isRequired,
onSelectedChange: PropTypes.func.isRequired,
onRemoveSelectedStateItem: PropTypes.func.isRequired,
onSeriesLookup: PropTypes.func.isRequired,
onArtistLookup: PropTypes.func.isRequired,
onSetImportArtistValue: PropTypes.func.isRequired,
onScroll: PropTypes.func.isRequired
};

@ -15,7 +15,6 @@ function createMapStateToProps() {
defaultMonitor: addArtist.defaults.monitor,
defaultQualityProfileId: addArtist.defaults.qualityProfileId,
defaultLanguageProfileId: addArtist.defaults.languageProfileId,
defaultSeriesType: addArtist.defaults.seriesType,
defaultAlbumFolder: addArtist.defaults.albumFolder,
items: importArtist.items,
isSmallScreen: dimensions.isSmallScreen,
@ -27,7 +26,7 @@ function createMapStateToProps() {
function createMapDispatchToProps(dispatch, props) {
return {
onSeriesLookup(name, path) {
onArtistLookup(name, path) {
dispatch(queueLookupArtist({
name,
path,

@ -9,9 +9,9 @@ import AlbumStudio from './AlbumStudio';
function createMapStateToProps() {
return createSelector(
createClientSideCollectionSelector(),
(series) => {
(artist) => {
return {
...series
...artist
};
}
);
@ -66,5 +66,5 @@ export default connectSection(
mapDispatchToProps,
undefined,
undefined,
{ section: 'series', uiSection: 'albumStudio' }
{ section: 'artist', uiSection: 'albumStudio' }
)(AlbumStudioConnector);

@ -4,15 +4,15 @@ import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
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 AlbumStudioRow from './AlbumStudioRow';
function createMapStateToProps() {
return createSelector(
createArtistSelector(),
(series) => {
return _.pick(series, [
(artist) => {
return _.pick(artist, [
'status',
'nameSlug',
'artistName',
@ -25,7 +25,7 @@ function createMapStateToProps() {
}
const mapDispatchToProps = {
toggleSeriesMonitored,
toggleArtistMonitored,
toggleSeasonMonitored,
toggleEpisodeMonitored
};
@ -41,7 +41,7 @@ class AlbumStudioRowConnector extends Component {
monitored
} = this.props;
this.props.toggleSeriesMonitored({
this.props.toggleArtistMonitored({
artistId,
monitored: !monitored
});
@ -71,7 +71,7 @@ class AlbumStudioRowConnector extends Component {
AlbumStudioRowConnector.propTypes = {
artistId: PropTypes.number.isRequired,
monitored: PropTypes.bool.isRequired,
toggleSeriesMonitored: PropTypes.func.isRequired,
toggleArtistMonitored: PropTypes.func.isRequired,
toggleSeasonMonitored: PropTypes.func.isRequired,
toggleEpisodeMonitored: PropTypes.func.isRequired
};

@ -1,6 +1,6 @@
@import "Content/icons";
.delete-series-modal {
.delete-artist-modal {
i {
margin-right : 5px;

@ -9,8 +9,8 @@ import DeleteArtistModalContent from './DeleteArtistModalContent';
function createMapStateToProps() {
return createSelector(
createArtistSelector(),
(series) => {
return series;
(artist) => {
return artist;
}
);
}

@ -13,12 +13,11 @@ function createMapStateToProps() {
createArtistSelector(),
createTrackFileSelector(),
createCommandsSelector(),
(id, sceneSeasonNumber, series, trackFile, commands) => {
const alternateTitles = sceneSeasonNumber ? _.filter(series.alternateTitles, { sceneSeasonNumber }) : [];
(id, sceneSeasonNumber, artist, trackFile, commands) => {
const alternateTitles = sceneSeasonNumber ? _.filter(artist.alternateTitles, { sceneSeasonNumber }) : [];
return {
artistMonitored: series.monitored,
seriesType: series.seriesType,
artistMonitored: artist.monitored,
trackFilePath: trackFile ? trackFile.path : null,
trackFileRelativePath: trackFile ? trackFile.relativePath : null,
alternateTitles

@ -24,27 +24,27 @@ function createMapStateToProps() {
(nameSlug, episodes, trackFiles, allArtists, commands) => {
const sortedArtist = _.orderBy(allArtists, 'sortName');
const artistIndex = _.findIndex(sortedArtist, { nameSlug });
const series = sortedArtist[artistIndex];
const artist = sortedArtist[artistIndex];
if (!series) {
if (!artist) {
return {};
}
const previousArtist = sortedArtist[artistIndex - 1] || _.last(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 isRefreshing = isArtistRefreshing || allArtistRefreshing;
const isSearching = !!findCommand(commands, { name: commandNames.ARTIST_SEARCH, artistId: series.id });
const isRenamingFiles = !!findCommand(commands, { name: commandNames.RENAME_FILES, artistId: series.id });
const isSearching = !!findCommand(commands, { name: commandNames.ARTIST_SEARCH, artistId: artist.id });
const isRenamingFiles = !!findCommand(commands, { name: commandNames.RENAME_FILES, artistId: artist.id });
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 isPopulated = episodes.isPopulated && trackFiles.isPopulated;
const episodesError = episodes.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) &&
(alternateTitle.sceneSeasonNumber === -1 || alternateTitle.sceneSeasonNumber === undefined)) {
acc.push(alternateTitle.title);
@ -54,7 +54,7 @@ function createMapStateToProps() {
}, []);
return {
...series,
...artist,
alternateTitles,
isRefreshing,
isSearching,

@ -54,7 +54,7 @@ class ArtistDetailsPageConnector extends Component {
if (!nameSlug) {
return (
<NotFound
message="Sorry, that series cannot be found."
message="Sorry, that artist cannot be found."
/>
);
}

@ -20,10 +20,10 @@ function createMapStateToProps() {
createArtistSelector(),
createCommandsSelector(),
createDimensionsSelector(),
(label, episodes, series, commands, dimensions) => {
(label, episodes, artist, commands, dimensions) => {
const isSearching = !!findCommand(commands, {
name: commandNames.SEASON_SEARCH,
artistId: series.id,
artistId: artist.id,
label
});
@ -34,7 +34,7 @@ function createMapStateToProps() {
items: sortedEpisodes,
columns: episodes.columns,
isSearching,
artistMonitored: series.monitored,
artistMonitored: artist.monitored,
isSmallScreen: dimensions.isSmallScreen
};
}

@ -9,8 +9,8 @@ function createMapStateToProps() {
return createSelector(
createArtistSelector(),
createTagsSelector(),
(series, tagList) => {
const tags = _.reduce(series.tags, (acc, tag) => {
(artist, tagList) => {
const tags = _.reduce(artist.tags, (acc, tag) => {
const matchingTag = _.find(tagList, { id: tag });
if (matchingTag) {

@ -14,7 +14,7 @@ class EditArtistModalConnector extends Component {
// Listeners
onModalClose = () => {
this.props.clearPendingChanges({ section: 'series' });
this.props.clearPendingChanges({ section: 'artist' });
this.props.onModalClose();
}

@ -36,7 +36,6 @@ class EditArtistModalContent extends Component {
albumFolder,
qualityProfileId,
languageProfileId,
// seriesType,
path,
tags
} = item;

@ -10,30 +10,29 @@ import EditArtistModalContent from './EditArtistModalContent';
function createMapStateToProps() {
return createSelector(
(state) => state.series,
(state) => state.artist,
(state) => state.settings.languageProfiles,
createArtistSelector(),
(seriesState, languageProfiles, series) => {
(artistState, languageProfiles, artist) => {
const {
isSaving,
saveError,
pendingChanges
} = seriesState;
} = artistState;
const seriesSettings = _.pick(series, [
const artistSettings = _.pick(artist, [
'monitored',
'albumFolder',
'qualityProfileId',
'languageProfileId',
// 'seriesType',
'path',
'tags'
]);
const settings = selectSettings(seriesSettings, pendingChanges, saveError);
const settings = selectSettings(artistSettings, pendingChanges, saveError);
return {
artistName: series.artistName,
artistName: artist.artistName,
isSaving,
saveError,
pendingChanges,

@ -14,11 +14,11 @@ function createMapStateToProps() {
(state) => state.settings.languageProfiles,
createClientSideCollectionSelector(),
createCommandSelector(commandNames.RENAME_ARTIST),
(languageProfiles, series, isOrganizingArtist) => {
(languageProfiles, artist, isOrganizingArtist) => {
return {
isOrganizingArtist,
showLanguageProfile: languageProfiles.items.length > 1,
...series
...artist
};
}
);
@ -82,5 +82,5 @@ export default connectSection(
mapDispatchToProps,
undefined,
undefined,
{ section: 'series', uiSection: 'artistEditor' }
{ section: 'artist', uiSection: 'artistEditor' }
)(ArtistEditorConnector);

@ -5,7 +5,6 @@ import SelectInput from 'Components/Form/SelectInput';
import LanguageProfileSelectInputConnector from 'Components/Form/LanguageProfileSelectInputConnector';
import QualityProfileSelectInputConnector from 'Components/Form/QualityProfileSelectInputConnector';
import RootFolderSelectInputConnector from 'Components/Form/RootFolderSelectInputConnector';
// import SeriesTypeSelectInput from 'Components/Form/SeriesTypeSelectInput';
import SpinnerButton from 'Components/Link/SpinnerButton';
import PageContentFooter from 'Components/Page/PageContentFooter';
import TagsModal from './Tags/TagsModal';

@ -43,7 +43,7 @@ class DeleteArtistModalContent extends Component {
render() {
const {
series,
artist,
onModalClose
} = this.props;
const deleteFiles = this.state.deleteFiles;
@ -57,13 +57,13 @@ class DeleteArtistModalContent extends Component {
<ModalBody>
<div>
<FormGroup>
<FormLabel>{`Delete Artist Folder${series.length > 1 ? 's' : ''}`}</FormLabel>
<FormLabel>{`Delete Artist Folder${artist.length > 1 ? 's' : ''}`}</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="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}
onChange={this.onDeleteFilesChange}
/>
@ -71,12 +71,12 @@ class DeleteArtistModalContent extends Component {
</div>
<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>
<ul>
{
series.map((s) => {
artist.map((s) => {
return (
<li key={s.artistName}>
<span>{s.artistName}</span>
@ -115,7 +115,7 @@ class DeleteArtistModalContent extends Component {
}
DeleteArtistModalContent.propTypes = {
series: PropTypes.arrayOf(PropTypes.object).isRequired,
artist: PropTypes.arrayOf(PropTypes.object).isRequired,
onModalClose: PropTypes.func.isRequired,
onDeleteSelectedPress: PropTypes.func.isRequired
};

@ -15,7 +15,7 @@ function createMapStateToProps() {
});
const sortedArtist = _.orderBy(selectedArtist, 'sortName');
const series = _.map(sortedArtist, (s) => {
const artist = _.map(sortedArtist, (s) => {
return {
artistName: s.artistName,
path: s.path
@ -23,7 +23,7 @@ function createMapStateToProps() {
});
return {
series
artist
};
}
);

@ -13,11 +13,11 @@ function createMapStateToProps() {
(state, { artistIds }) => artistIds,
createAllArtistSelector(),
(artistIds, allArtists) => {
const series = _.intersectionWith(allArtists, artistIds, (s, id) => {
const artist = _.intersectionWith(allArtists, artistIds, (s, id) => {
return s.id === id;
});
const sortedArtist = _.orderBy(series, 'sortName');
const sortedArtist = _.orderBy(artist, 'sortName');
const artistNames = _.map(sortedArtist, 'artistName');
return {

@ -93,7 +93,7 @@ class TagsModalContent extends Component {
value={applyTags}
values={applyTagsOptions}
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',
'Remove: Remove the entered tags',
'Replace: Replace the tags with the entered tags (enter no tags to clear all tags)'

@ -11,11 +11,11 @@ function createMapStateToProps() {
createAllArtistSelector(),
createTagsSelector(),
(artistIds, allArtists, tagList) => {
const series = _.intersectionWith(allArtists, artistIds, (s, id) => {
const artist = _.intersectionWith(allArtists, artistIds, (s, id) => {
return s.id === id;
});
const artistTags = _.uniq(_.concat(..._.map(series, 'tags')));
const artistTags = _.uniq(_.concat(..._.map(artist, 'tags')));
return {
artistTags,

@ -302,7 +302,7 @@ class ArtistIndex extends Component {
/>
<ArtistIndexFooter
series={items}
artist={items}
/>
</div>
}

@ -44,17 +44,17 @@ function getScrollTop(view, scrollTop, isSmallScreen) {
function createMapStateToProps() {
return createSelector(
(state) => state.series,
(state) => state.artist,
(state) => state.artistIndex,
createCommandSelector(commandNames.REFRESH_ARTIST),
createCommandSelector(commandNames.RSS_SYNC),
createDimensionsSelector(),
(series, artistIndex, isRefreshingArtist, isRssSyncExecuting, dimensionsState) => {
(artist, artistIndex, isRefreshingArtist, isRssSyncExecuting, dimensionsState) => {
return {
isRefreshingArtist,
isRssSyncExecuting,
isSmallScreen: dimensionsState.isSmallScreen,
...series,
...artist,
...artistIndex
};
}

@ -4,15 +4,15 @@ import DescriptionList from 'Components/DescriptionList/DescriptionList';
import DescriptionListItem from 'Components/DescriptionList/DescriptionListItem';
import styles from './ArtistIndexFooter.css';
function ArtistIndexFooter({ series }) {
const count = series.length;
function ArtistIndexFooter({ artist }) {
const count = artist.length;
let tracks = 0;
let trackFiles = 0;
let ended = 0;
let continuing = 0;
let monitored = 0;
series.forEach((s) => {
artist.forEach((s) => {
tracks += s.trackCount || 0;
trackFiles += s.trackFileCount || 0;
@ -98,7 +98,7 @@ function ArtistIndexFooter({ series }) {
}
ArtistIndexFooter.propTypes = {
series: PropTypes.arrayOf(PropTypes.object).isRequired
artist: PropTypes.arrayOf(PropTypes.object).isRequired
};
export default ArtistIndexFooter;

@ -216,9 +216,9 @@ class ArtistIndexBanners extends Component {
showQualityProfile
} = bannerOptions;
const series = items[rowIndex * columnCount + columnIndex];
const artist = items[rowIndex * columnCount + columnIndex];
if (!series) {
if (!artist) {
return null;
}
@ -236,7 +236,7 @@ class ArtistIndexBanners extends Component {
shortDateFormat={shortDateFormat}
timeFormat={timeFormat}
style={style}
{...series}
{...artist}
/>
);
}

@ -11,14 +11,14 @@ function createMapStateToProps() {
createClientSideCollectionSelector(),
createUISettingsSelector(),
createDimensionsSelector(),
(bannerOptions, series, uiSettings, dimensions) => {
(bannerOptions, artist, uiSettings, dimensions) => {
return {
bannerOptions,
showRelativeDates: uiSettings.showRelativeDates,
shortDateFormat: uiSettings.shortDateFormat,
timeFormat: uiSettings.timeFormat,
isSmallScreen: dimensions.isSmallScreen,
...series
...artist
};
}
);
@ -29,5 +29,5 @@ export default connectSection(
undefined,
undefined,
{ withRef: true },
{ section: 'series', uiSection: 'artistIndex' }
{ section: 'artist', uiSection: 'artistIndex' }
)(ArtistIndexBanners);

@ -216,9 +216,9 @@ class ArtistIndexPosters extends Component {
showQualityProfile
} = posterOptions;
const series = items[rowIndex * columnCount + columnIndex];
const artist = items[rowIndex * columnCount + columnIndex];
if (!series) {
if (!artist) {
return null;
}
@ -236,7 +236,7 @@ class ArtistIndexPosters extends Component {
shortDateFormat={shortDateFormat}
timeFormat={timeFormat}
style={style}
{...series}
{...artist}
/>
);
}

@ -11,14 +11,14 @@ function createMapStateToProps() {
createClientSideCollectionSelector(),
createUISettingsSelector(),
createDimensionsSelector(),
(posterOptions, series, uiSettings, dimensions) => {
(posterOptions, artist, uiSettings, dimensions) => {
return {
posterOptions,
showRelativeDates: uiSettings.showRelativeDates,
shortDateFormat: uiSettings.shortDateFormat,
timeFormat: uiSettings.timeFormat,
isSmallScreen: dimensions.isSmallScreen,
...series
...artist
};
}
);
@ -29,5 +29,5 @@ export default connectSection(
undefined,
undefined,
{ withRef: true },
{ section: 'series', uiSection: 'artistIndex' }
{ section: 'artist', uiSection: 'artistIndex' }
)(ArtistIndexPosters);

@ -69,7 +69,7 @@ class ArtistIndexTable extends Component {
columns
} = this.props;
const series = items[rowIndex];
const artist = items[rowIndex];
return (
<ArtistIndexItemConnector
@ -77,7 +77,7 @@ class ArtistIndexTable extends Component {
component={ArtistIndexRow}
style={style}
columns={columns}
{...series}
{...artist}
/>
);
}

@ -8,10 +8,10 @@ function createMapStateToProps() {
return createSelector(
(state) => state.app.dimensions,
createClientSideCollectionSelector(),
(dimensions, series) => {
(dimensions, artist) => {
return {
isSmallScreen: dimensions.isSmallScreen,
...series
...artist
};
}
);
@ -30,5 +30,5 @@ export default connectSection(
createMapDispatchToProps,
undefined,
{ withRef: true },
{ section: 'series', uiSection: 'artistIndex' }
{ section: 'artist', uiSection: 'artistIndex' }
)(ArtistIndexTable);

@ -44,9 +44,6 @@ class AgendaEvent extends Component {
id,
artist,
title,
// seasonNumber,
// episodeNumber,
// absoluteEpisodeNumber,
releaseDate,
monitored,
hasFile,
@ -101,9 +98,6 @@ class AgendaEvent extends Component {
{
!!queueItem &&
<CalendarEventQueueDetails
seriesType={artist.seriesType}
// seasonNumber={seasonNumber}
// absoluteEpisodeNumber={absoluteEpisodeNumber}
{...queueItem}
/>
}
@ -135,9 +129,6 @@ AgendaEvent.propTypes = {
id: PropTypes.number.isRequired,
artist: PropTypes.object.isRequired,
title: PropTypes.string.isRequired,
// seasonNumber: PropTypes.number.isRequired,
// episodeNumber: PropTypes.number.isRequired,
// absoluteEpisodeNumber: PropTypes.number,
releaseDate: PropTypes.string.isRequired,
monitored: PropTypes.bool.isRequired,
hasFile: PropTypes.bool.isRequired,

@ -66,7 +66,7 @@ class CalendarEvent extends Component {
const downloading = !!(queueItem || grabbed);
const isMonitored = artist.monitored && monitored;
const statusStyle = getStatusStyle(id, downloading, startTime, isMonitored);
// const missingAbsoluteNumber = artist.seriesType === 'anime' && seasonNumber > 0 && !absoluteEpisodeNumber;
// const missingAbsoluteNumber = artist.artistType === 'anime' && seasonNumber > 0 && !absoluteEpisodeNumber;
return (
<div>

@ -2,14 +2,14 @@ import PropTypes from 'prop-types';
import React from 'react';
import SelectInput from './SelectInput';
const seriesTypeOptions = [
const artistTypeOptions = [
{ key: 'standard', value: 'Standard' },
{ key: 'daily', value: 'Daily' },
{ key: 'anime', value: 'Anime' }
];
function SeriesTypeSelectInput(props) {
const values = [...seriesTypeOptions];
const values = [...artistTypeOptions];
const {
includeNoChange,

@ -39,7 +39,7 @@ class MonitorToggleButton extends Component {
className={styles.disabledButton}
size={size}
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 {
version,
isLocalStorageSupported,
seriesError,
artistError,
tagsError,
qualityProfilesError,
uiSettingsError
@ -17,10 +17,10 @@ function ErrorPage(props) {
if (!isLocalStorageSupported) {
errorMessage = 'Local Storage is not supported or disabled. A plugin or private browsing may have disabled it.';
} else if (seriesError) {
errorMessage = getErrorMessage(seriesError, 'Failed to load artist from API');
} else if (artistError) {
errorMessage = getErrorMessage(artistError, 'Failed to load artist from API');
} else if (tagsError) {
errorMessage = getErrorMessage(seriesError, 'Failed to load artist from API');
errorMessage = getErrorMessage(artistError, 'Failed to load artist from API');
} else if (qualityProfilesError) {
errorMessage = getErrorMessage(qualityProfilesError, 'Failed to load quality profiles from API');
} else if (uiSettingsError) {
@ -43,7 +43,7 @@ function ErrorPage(props) {
ErrorPage.propTypes = {
version: PropTypes.string.isRequired,
isLocalStorageSupported: PropTypes.bool.isRequired,
seriesError: PropTypes.object,
artistError: PropTypes.object,
tagsError: PropTypes.object,
qualityProfilesError: PropTypes.object,
uiSettingsError: PropTypes.object

@ -36,14 +36,14 @@
flex-grow: 1;
}
.seriesContainer {
.artistContainer {
@add-mixin scrollbar;
@add-mixin scrollbarTrack;
@add-mixin scrollbarThumb;
}
.containerOpen {
.seriesContainer {
.artistContainer {
position: absolute;
top: 42px;
z-index: 1;
@ -80,7 +80,7 @@
color: $disabledColor;
}
.addNewSeriesSuggestion {
.addNewArtistSuggestion {
padding: 0 3px;
cursor: pointer;
}

@ -62,7 +62,7 @@ class ArtistSearchInput extends Component {
renderSuggestion(item, { query }) {
if (item.type === ADD_NEW_TYPE) {
return (
<div className={styles.addNewSeriesSuggestion}>
<div className={styles.addNewArtistSuggestion}>
Search for {query}
</div>
);
@ -76,9 +76,9 @@ class ArtistSearchInput extends Component {
);
}
goToArtist(series) {
goToArtist(artist) {
this.setState({ value: '' });
this.props.onGoToSeries(series.nameSlug);
this.props.onGoToArtist(artist.nameSlug);
}
reset() {
@ -117,8 +117,8 @@ class ArtistSearchInput extends Component {
return;
}
// If an suggestion is not selected go to the first series,
// otherwise go to the selected series.
// If an suggestion is not selected go to the first artist,
// otherwise go to the selected artist.
if (highlightedSuggestionIndex == null) {
this.goToArtist(suggestions[0]);
@ -134,12 +134,12 @@ class ArtistSearchInput extends Component {
onSuggestionsFetchRequested = ({ value }) => {
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
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);
});
});
@ -192,7 +192,7 @@ class ArtistSearchInput extends Component {
const inputProps = {
ref: this.setInputRef,
className: styles.input,
name: 'seriesSearch',
name: 'artistSearch',
value,
placeholder: 'Search',
autoComplete: 'off',
@ -206,7 +206,7 @@ class ArtistSearchInput extends Component {
const theme = {
container: styles.container,
containerOpen: styles.containerOpen,
suggestionsContainer: styles.seriesContainer,
suggestionsContainer: styles.artistContainer,
suggestionsList: styles.list,
suggestion: styles.listItem,
suggestionHighlighted: styles.highlighted
@ -241,8 +241,8 @@ class ArtistSearchInput extends Component {
}
ArtistSearchInput.propTypes = {
series: PropTypes.arrayOf(PropTypes.object).isRequired,
onGoToSeries: PropTypes.func.isRequired,
artist: PropTypes.arrayOf(PropTypes.object).isRequired,
onGoToArtist: PropTypes.func.isRequired,
onGoToAddNewArtist: PropTypes.func.isRequired,
bindShortcut: PropTypes.func.isRequired
};

@ -8,9 +8,9 @@ import ArtistSearchInput from './ArtistSearchInput';
function createMapStateToProps() {
return createSelector(
createAllArtistSelector(),
(series) => {
(artist) => {
return {
series: _.sortBy(series, 'sortName')
artist: _.sortBy(artist, 'sortName')
};
}
);
@ -18,7 +18,7 @@ function createMapStateToProps() {
function createMapDispatchToProps(dispatch, props) {
return {
onGoToSeries(nameSlug) {
onGoToArtist(nameSlug) {
dispatch(push(`${window.Sonarr.urlBase}/artist/${nameSlug}`));
},

@ -28,18 +28,18 @@ function testLocalStorage() {
function createMapStateToProps() {
return createSelector(
(state) => state.series,
(state) => state.artist,
(state) => state.tags,
(state) => state.settings,
(state) => state.app,
createDimensionsSelector(),
(series, tags, settings, app, dimensions) => {
const isPopulated = series.isPopulated &&
(artist, tags, settings, app, dimensions) => {
const isPopulated = artist.isPopulated &&
tags.isPopulated &&
settings.qualityProfiles.isPopulated &&
settings.ui.isPopulated;
const hasError = !!series.error ||
const hasError = !!artist.error ||
!!tags.error ||
!!settings.qualityProfiles.error ||
!!settings.ui.error;
@ -47,7 +47,7 @@ function createMapStateToProps() {
return {
isPopulated,
hasError,
seriesError: series.error,
artistError: artist.error,
tagsError: tags.error,
qualityProfilesError: settings.qualityProfiles.error,
uiSettingsError: settings.ui.error,

@ -23,7 +23,7 @@ function getIconName(name) {
return icons.RSS;
case 'SeasonSearch':
return icons.SEARCH;
case 'SeriesSearch':
case 'ArtistSearch':
return icons.SEARCH;
case 'UpdateSceneMapping':
return icons.REFRESH;

@ -22,7 +22,7 @@ const links = [
iconName: icons.ARTIST_CONTINUING,
title: 'Artist',
to: '/',
alias: '/series',
alias: '/artist',
children: [
{
title: 'Add New',

@ -132,8 +132,8 @@ class SignalRConnector extends Component {
return;
}
if (name === 'series') {
this.handleSeries(body);
if (name === 'artist') {
this.handleArtist(body);
return;
}
@ -225,9 +225,9 @@ class SignalRConnector extends Component {
this.props.fetchHealth();
}
handleSeries = (body) => {
handleArtist = (body) => {
const action = body.action;
const section = 'series';
const section = 'artist';
if (action === 'updated') {
this.props.updateItem({ section, ...body.resource });

@ -61,7 +61,7 @@ class EpisodeDetailsModalContent extends Component {
onModalClose
} = this.props;
const seriesLink = `/artist/${nameSlug}`;
const artistLink = `/artist/${nameSlug}`;
return (
<ModalContent
@ -149,7 +149,7 @@ class EpisodeDetailsModalContent extends Component {
showOpenArtistButton &&
<Button
className={styles.openSeriesButton}
to={seriesLink}
to={artistLink}
onPress={onModalClose}
>
Open Artist

@ -15,19 +15,17 @@ function createMapStateToProps() {
return createSelector(
createEpisodeSelector(),
createArtistSelector(),
(album, series) => {
(album, artist) => {
const {
artistName,
nameSlug,
monitored: artistMonitored,
seriesType
} = series;
monitored: artistMonitored
} = artist;
return {
artistName,
nameSlug,
artistMonitored,
seriesType,
...album
};
}

@ -15,12 +15,12 @@ function EpisodeNumber(props) {
sceneAbsoluteEpisodeNumber,
unverifiedSceneNumbering,
alternateTitles,
seriesType
artistType
} = props;
const hasSceneInformation = sceneSeasonNumber !== undefined ||
sceneEpisodeNumber !== undefined ||
(seriesType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined) ||
(artistType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined) ||
!!alternateTitles.length;
return (
@ -33,7 +33,7 @@ function EpisodeNumber(props) {
{episodeNumber}
{
seriesType === 'anime' && !!absoluteEpisodeNumber &&
artistType === 'anime' && !!absoluteEpisodeNumber &&
<span className={styles.absoluteEpisodeNumber}>
({absoluteEpisodeNumber})
</span>
@ -47,7 +47,7 @@ function EpisodeNumber(props) {
sceneEpisodeNumber={sceneEpisodeNumber}
sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
alternateTitles={alternateTitles}
seriesType={seriesType}
artistType={artistType}
/>
}
position={tooltipPositions.RIGHT}
@ -56,7 +56,7 @@ function EpisodeNumber(props) {
{episodeNumber}
{
seriesType === 'anime' && !!absoluteEpisodeNumber &&
artistType === 'anime' && !!absoluteEpisodeNumber &&
<span className={styles.absoluteEpisodeNumber}>
({absoluteEpisodeNumber})
</span>
@ -75,7 +75,7 @@ function EpisodeNumber(props) {
}
{
seriesType === 'anime' && !absoluteEpisodeNumber &&
artistType === 'anime' && !absoluteEpisodeNumber &&
<Icon
className={styles.warning}
name={icons.WARNING}
@ -96,7 +96,7 @@ EpisodeNumber.propTypes = {
sceneAbsoluteEpisodeNumber: PropTypes.number,
unverifiedSceneNumbering: PropTypes.bool.isRequired,
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
seriesType: PropTypes.string
artistType: PropTypes.string
};
EpisodeNumber.defaultProps = {

@ -13,7 +13,7 @@ function createMapStateToProps() {
(state, { sceneSeasonNumber }) => sceneSeasonNumber,
createArtistSelector(),
createCommandsSelector(),
(albumId, sceneSeasonNumber, series, commands) => {
(albumId, sceneSeasonNumber, artist, commands) => {
const isSearching = _.some(commands, (command) => {
const episodeSearch = command.name === commandNames.EPISODE_SEARCH;
@ -25,8 +25,8 @@ function createMapStateToProps() {
});
return {
artistMonitored: series.monitored,
seriesType: series.seriesType,
artistMonitored: artist.monitored,
artistType: artist.artistType,
isSearching
};
}

@ -62,7 +62,7 @@ EpisodeTitleLink.propTypes = {
};
EpisodeTitleLink.defaultProps = {
showSeriesButton: false
showArtistButton: false
};
export default EpisodeTitleLink;

@ -10,7 +10,7 @@ function SceneInfo(props) {
sceneEpisodeNumber,
sceneAbsoluteEpisodeNumber,
alternateTitles,
seriesType
artistType
} = props;
return (
@ -36,7 +36,7 @@ function SceneInfo(props) {
}
{
seriesType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined &&
artistType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined &&
<DescriptionListItem
titleClassName={styles.title}
descriptionClassName={styles.description}
@ -77,7 +77,7 @@ SceneInfo.propTypes = {
sceneEpisodeNumber: PropTypes.number,
sceneAbsoluteEpisodeNumber: PropTypes.number,
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
seriesType: PropTypes.string
artistType: PropTypes.string
};
export default SceneInfo;

@ -9,16 +9,16 @@ function SeasonEpisodeNumber(props) {
episodeNumber,
absoluteEpisodeNumber,
airDate,
seriesType
artistType
} = props;
if (seriesType === 'daily' && airDate) {
if (artistType === 'daily' && airDate) {
return (
<span>{airDate}</span>
);
}
if (seriesType === 'anime') {
if (artistType === 'anime') {
return (
<span>
{seasonNumber}x{padNumber(episodeNumber, 2)}
@ -45,7 +45,7 @@ SeasonEpisodeNumber.propTypes = {
episodeNumber: PropTypes.number.isRequired,
absoluteEpisodeNumber: PropTypes.number,
airDate: PropTypes.string,
seriesType: PropTypes.string
artistType: PropTypes.string
};
export default SeasonEpisodeNumber;

@ -9,7 +9,7 @@ export const QUALITY_PROFILE_SELECT = 'qualityProfileSelect';
export const LANGUAGE_PROFILE_SELECT = 'languageProfileSelect';
export const ROOT_FOLDER_SELECT = 'rootFolderSelect';
export const SELECT = 'select';
export const SERIES_TYPE_SELECT = 'seriesTypeSelect';
export const SERIES_TYPE_SELECT = 'artistTypeSelect';
export const TAG = 'tag';
export const TEXT = 'text';
export const TEXT_TAG = 'textTag';

@ -14,14 +14,14 @@ function createMapStateToProps() {
(state) => state.organizePreview,
(state) => state.settings.naming,
createArtistSelector(),
(organizePreview, naming, series) => {
(organizePreview, naming, artist) => {
const props = { ...organizePreview };
props.isFetching = organizePreview.isFetching || naming.isFetching;
props.isPopulated = organizePreview.isPopulated && naming.isPopulated;
props.error = organizePreview.error || naming.error;
props.renameTracks = naming.item.renameTracks;
props.trackFormat = naming.item['standardTrackFormat'];
props.path = series.path;
props.path = artist.path;
return props;
}

@ -76,7 +76,7 @@ function EditRestrictionModalContent(props) {
<FormInputGroup
type={inputTypes.TAG}
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}
onChange={onInputChange}
/>

@ -154,7 +154,7 @@ function EditNotificationModalContent(props) {
<FormInputGroup
type={inputTypes.TAG}
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}
onChange={onInputChange}
/>

@ -110,7 +110,7 @@ function EditDelayProfileModalContent(props) {
{
id === 1 ?
<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> :
<FormGroup>
@ -120,7 +120,7 @@ function EditDelayProfileModalContent(props) {
type={inputTypes.TAG}
name="tags"
{...tags}
helpText="Applies to series with at least one matching tag"
helpText="Applies to artist with at least one matching tag"
onChange={onInputChange}
/>
</FormGroup>

@ -101,7 +101,7 @@ function EditLanguageProfileModalContent(props) {
id &&
<div
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
kind={kinds.DANGER}

@ -101,7 +101,7 @@ function EditQualityProfileModalContent(props) {
id &&
<div
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
kind={kinds.DANGER}

@ -87,7 +87,7 @@ function Settings() {
</Link>
<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>
<Link

@ -68,7 +68,7 @@ const addArtistActionHandlers = {
promise.done((data) => {
dispatch(batchActions([
updateItem({ section: 'series', ...data }),
updateItem({ section: 'artist', ...data }),
set({
section,

@ -17,31 +17,31 @@ const albumStudioActionHandlers = {
} = payload;
let monitoringOptions = null;
const series = [];
const allArtists = getState().series.items;
const artist = [];
const allArtists = getState().artist.items;
artistIds.forEach((id) => {
const s = _.find(allArtists, { id });
const seriesToUpdate = { id };
const artistToUpdate = { id };
if (payload.hasOwnProperty('monitored')) {
seriesToUpdate.monitored = monitored;
artistToUpdate.monitored = monitored;
}
if (monitor) {
const {
seasons,
options: seriesMonitoringOptions
options: artistMonitoringOptions
} = getMonitoringOptions(_.cloneDeep(s.seasons), monitor);
if (!monitoringOptions) {
monitoringOptions = seriesMonitoringOptions;
monitoringOptions = artistMonitoringOptions;
}
seriesToUpdate.seasons = seasons;
artistToUpdate.seasons = seasons;
}
series.push(seriesToUpdate);
artist.push(artistToUpdate);
});
dispatch(set({
@ -53,7 +53,7 @@ const albumStudioActionHandlers = {
url: '/albumStudio',
method: 'POST',
data: JSON.stringify({
series,
artist,
monitoringOptions
}),
dataType: 'json'

@ -7,7 +7,7 @@ import createSaveProviderHandler from './Creators/createSaveProviderHandler';
import createRemoveItemHandler from './Creators/createRemoveItemHandler';
import { updateItem } from './baseActions';
const section = 'series';
const section = 'artist';
const artistActionHandlers = {
[types.FETCH_ARTIST]: createFetchHandler(section, '/artist'),
@ -15,12 +15,12 @@ const artistActionHandlers = {
[types.SAVE_ARTIST]: createSaveProviderHandler(
section,
'/artist',
(state) => state.series),
(state) => state.artist),
[types.DELETE_ARTIST]: createRemoveItemHandler(
section,
'/artist',
(state) => state.series),
(state) => state.artist),
[types.TOGGLE_ARTIST_MONITORED]: function(payload) {
return function(dispatch, getState) {
@ -29,7 +29,7 @@ const artistActionHandlers = {
monitored
} = payload;
const series = _.find(getState().series.items, { id });
const artist = _.find(getState().artist.items, { id });
dispatch(updateItem({
id,
@ -41,7 +41,7 @@ const artistActionHandlers = {
url: `/artist/${id}`,
method: 'PUT',
data: JSON.stringify({
...series,
...artist,
monitored
}),
dataType: 'json'
@ -74,8 +74,8 @@ const artistActionHandlers = {
monitored
} = payload;
const series = _.find(getState().series.items, { id });
const seasons = _.cloneDeep(series.seasons);
const artist = _.find(getState().artist.items, { id });
const seasons = _.cloneDeep(artist.seasons);
const season = _.find(seasons, { seasonNumber });
season.isSaving = true;
@ -92,7 +92,7 @@ const artistActionHandlers = {
url: `/artist/${id}`,
method: 'PUT',
data: JSON.stringify({
...series,
...artist,
seasons
}),
dataType: 'json'
@ -122,7 +122,7 @@ const artistActionHandlers = {
dispatch(updateItem({
id,
section,
seasons: series.seasons
seasons: artist.seasons
}));
});
};

@ -5,12 +5,12 @@ import artistActionHandlers from './artistActionHandlers';
export const fetchArtist = artistActionHandlers[types.FETCH_ARTIST];
export const saveArtist = artistActionHandlers[types.SAVE_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 setArtistValue = createAction(types.SET_ARTIST_VALUE, (payload) => {
return {
section: 'series',
section: 'artist',
...payload
};
});

@ -22,11 +22,11 @@ const artistEditorActionHandlers = {
promise.done((data) => {
dispatch(batchActions([
...data.map((series) => {
...data.map((artist) => {
return updateItem({
id: series.id,
section: 'series',
...series
id: artist.id,
section: 'artist',
...artist
});
}),

@ -4,7 +4,7 @@ import { batchActions } from 'redux-batched-actions';
import getNewSeries from 'Utilities/Series/getNewSeries';
import * as types from './actionTypes';
import { set, updateItem, removeItem } from './baseActions';
import { startLookupSeries } from './importArtistActions';
import { startLookupArtist } from './importArtistActions';
import { fetchRootFolders } from './rootFolderActions';
const section = 'importArtist';
@ -38,7 +38,7 @@ const importArtistActionHandlers = {
}));
if (term && term.length > 2) {
dispatch(startLookupSeries());
dispatch(startLookupArtist());
}
};
},
@ -97,7 +97,7 @@ const importArtistActionHandlers = {
promise.always(() => {
concurrentLookups--;
dispatch(startLookupSeries());
dispatch(startLookupArtist());
});
};
},
@ -114,8 +114,8 @@ const importArtistActionHandlers = {
const item = _.find(items, { id });
const selectedArtist = item.selectedArtist;
// Make sure we have a selected series and
// the same series hasn't been added yet.
// Make sure we have a selected artist and
// the same artist hasn't been added yet.
if (selectedArtist && !_.some(acc, { foreignArtistId: selectedArtist.foreignArtistId })) {
const newSeries = getNewSeries(_.cloneDeep(selectedArtist), item);
newSeries.path = item.path;
@ -142,7 +142,7 @@ const importArtistActionHandlers = {
isImported: true
}),
...data.map((series) => updateItem({ section: 'series', ...series })),
...data.map((artist) => updateItem({ section: 'artist', ...artist })),
...addedIds.map((id) => removeItem({ section, id }))
]));

@ -3,7 +3,7 @@ import * as types from './actionTypes';
import importArtistActionHandlers from './importArtistActionHandlers';
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 clearImportArtist = createAction(types.CLEAR_IMPORT_ARTIST);

@ -22,7 +22,6 @@ export const defaultState = {
monitor: 'allEpisodes',
qualityProfileId: 0,
languageProfileId: 0,
seriesType: 'standard',
primaryAlbumTypes: ['Album'],
secondaryAlbumTypes: ['Studio'],
albumFolder: true,

@ -20,7 +20,7 @@ export const defaultState = {
pendingChanges: {}
};
const reducerSection = 'series';
const reducerSection = 'artist';
const artistReducers = handleActions({

@ -19,7 +19,7 @@ export const defaultState = {
columns: [
{
name: 'series.sortName',
name: 'artist.sortName',
label: 'Artist Name',
isSortable: true,
isVisible: true

@ -2,9 +2,9 @@ import { combineReducers } from 'redux';
import { enableBatching } from 'redux-batched-actions';
import { routerReducer } from 'react-router-redux';
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 series, { defaultState as defaultArtistState } from './artistReducers';
import artist, { defaultState as defaultArtistState } from './artistReducers';
import artistIndex, { defaultState as defaultArtistIndexState } from './artistIndexReducers';
import artistEditor, { defaultState as defaultArtistEditorState } from './artistEditorReducers';
import albumStudio, { defaultState as defaultAlbumStudioState } from './albumStudioReducers';
@ -31,9 +31,9 @@ import organizePreview, { defaultState as defaultOrganizePreviewState } from './
export const defaultState = {
app: defaultappState,
addArtist: defaultAddSeriesState,
addArtist: defaultAddArtistState,
importArtist: defaultImportArtistState,
series: defaultArtistState,
artist: defaultArtistState,
artistIndex: defaultArtistIndexState,
artistEditor: defaultArtistEditorState,
albumStudio: defaultAlbumStudioState,
@ -63,7 +63,7 @@ export default enableBatching(combineReducers({
app,
addArtist,
importArtist,
series,
artist,
artistIndex,
artistEditor,
albumStudio,

@ -19,10 +19,10 @@ export const defaultState = {
recentFolders: [],
importMode: 'move',
sortPredicates: {
series: function(item, direction) {
const series = item.series;
artist: function(item, direction) {
const artist = item.artist;
return series ? series.sortName : '';
return artist ? artist.sortName : '';
},
quality: function(item, direction) {

@ -44,7 +44,7 @@ export const defaultState = {
isModifiable: false
},
{
name: 'series.sortName',
name: 'artist.sortName',
label: 'Artist',
isSortable: true,
isVisible: true

@ -71,7 +71,7 @@ export const defaultState = {
columns: [
{
name: 'series.sortName',
name: 'artist.sortName',
label: 'Artist Name',
isSortable: true,
isVisible: true

@ -2,9 +2,9 @@ import { createSelector } from 'reselect';
function createAllArtistSelector() {
return createSelector(
(state) => state.series,
(series) => {
return series.items;
(state) => state.artist,
(artist) => {
return artist.items;
}
);
}

@ -6,8 +6,8 @@ function createArtistSelector() {
return createSelector(
(state, { artistId }) => artistId,
createAllArtistSelector(),
(artistId, series) => {
return _.find(series, { id: artistId });
(artistId, artist) => {
return _.find(artist, { id: artistId });
}
);
}

@ -6,8 +6,8 @@ function createExistingArtistSelector() {
return createSelector(
(state, { foreignArtistId }) => foreignArtistId,
createAllArtistSelector(),
(foreignArtistId, series) => {
return _.some(series, { foreignArtistId });
(foreignArtistId, artist) => {
return _.some(artist, { foreignArtistId });
}
);
}

@ -8,16 +8,15 @@ function createImportArtistItemSelector() {
(state) => state.addArtist,
(state) => state.importArtist,
createAllArtistSelector(),
(id, addArtist, importArtist, series) => {
(id, addArtist, importArtist, artist) => {
const item = _.find(importArtist.items, { id }) || {};
const selectedArtist = item && item.selectedArtist;
const isExistingArtist = !!selectedArtist && _.some(series, { foreignArtistId: selectedArtist.foreignArtistId });
const isExistingArtist = !!selectedArtist && _.some(artist, { foreignArtistId: selectedArtist.foreignArtistId });
return {
defaultMonitor: addArtist.defaults.monitor,
defaultQualityProfileId: addArtist.defaults.qualityProfileId,
defaultSeriesType: addArtist.defaults.seriesType,
defaultSeasonFolder: addArtist.defaults.albumFolder,
defaultAlbumFolder: addArtist.defaults.albumFolder,
...item,
isExistingArtist
};

@ -6,12 +6,12 @@ function createProfileInUseSelector(profileProp) {
return createSelector(
(state, { id }) => id,
createAllArtistSelector(),
(id, series) => {
(id, artist) => {
if (!id) {
return false;
}
return _.some(series, { [profileProp]: id });
return _.some(artist, { [profileProp]: id });
}
);
}

@ -24,7 +24,7 @@ function createMapStateToProps() {
trackFiles,
languageProfilesSchema,
qualityProfileSchema,
series
artist
) => {
const filtered = _.filter(tracks.items, (track) => {
if (albumId >= 0 && track.albumId !== albumId) {
@ -56,7 +56,7 @@ function createMapStateToProps() {
return {
items,
seriesType: series.seriesType,
artistType: artist.artistType,
isDeleting: trackFiles.isDeleting,
isSaving: trackFiles.isSaving,
languages,

@ -1,6 +1,6 @@
import getMonitoringOptions from 'Utilities/Series/getMonitoringOptions';
function getNewSeries(series, payload) {
function getNewSeries(artist, payload) {
const {
rootFolderPath,
monitor,
@ -17,22 +17,22 @@ function getNewSeries(series, payload) {
// const {
// seasons,
// options: addOptions
// } = getMonitoringOptions(series.seasons, monitor);
// } = getMonitoringOptions(artist.seasons, monitor);
// addOptions.searchForMissingAlbums = searchForMissingAlbums;
// series.addOptions = addOptions;
// series.seasons = seasons;
series.monitored = true;
series.qualityProfileId = qualityProfileId;
series.languageProfileId = languageProfileId;
series.rootFolderPath = rootFolderPath;
series.artistType = artistType;
series.albumFolder = albumFolder;
series.primaryAlbumTypes = primaryAlbumTypes;
series.secondaryAlbumTypes = secondaryAlbumTypes;
series.tags = tags;
// artist.addOptions = addOptions;
// artist.seasons = seasons;
artist.monitored = true;
artist.qualityProfileId = qualityProfileId;
artist.languageProfileId = languageProfileId;
artist.rootFolderPath = rootFolderPath;
artist.artistType = artistType;
artist.albumFolder = albumFolder;
artist.primaryAlbumTypes = primaryAlbumTypes;
artist.secondaryAlbumTypes = secondaryAlbumTypes;
artist.tags = tags;
return series;
return artist;
}
export default getNewSeries;

@ -17,7 +17,7 @@ function CutoffUnmetRow(props) {
const {
id,
trackFileId,
series,
artist,
seasonNumber,
episodeNumber,
absoluteEpisodeNumber,
@ -50,12 +50,12 @@ function CutoffUnmetRow(props) {
return null;
}
if (name === 'series.sortName') {
if (name === 'artist.sortName') {
return (
<TableRowCell key={name}>
<ArtistNameLink
titleSlug={series.titleSlug}
title={series.title}
titleSlug={artist.titleSlug}
title={artist.title}
/>
</TableRowCell>
);
@ -71,7 +71,7 @@ function CutoffUnmetRow(props) {
seasonNumber={seasonNumber}
episodeNumber={episodeNumber}
absoluteEpisodeNumber={absoluteEpisodeNumber}
seriesType={series.seriesType}
artistType={artist.artistType}
sceneSeasonNumber={sceneSeasonNumber}
sceneEpisodeNumber={sceneEpisodeNumber}
sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
@ -85,7 +85,7 @@ function CutoffUnmetRow(props) {
<TableRowCell key={name}>
<EpisodeTitleLink
albumId={id}
artistId={series.id}
artistId={artist.id}
episodeEntity={episodeEntities.WANTED_CUTOFF_UNMET}
episodeTitle={title}
showOpenArtistButton={true}
@ -136,7 +136,7 @@ function CutoffUnmetRow(props) {
<EpisodeSearchCellConnector
key={name}
albumId={id}
artistId={series.id}
artistId={artist.id}
episodeTitle={title}
episodeEntity={episodeEntities.WANTED_CUTOFF_UNMET}
showOpenArtistButton={true}
@ -154,7 +154,7 @@ function CutoffUnmetRow(props) {
CutoffUnmetRow.propTypes = {
id: PropTypes.number.isRequired,
trackFileId: PropTypes.number,
series: PropTypes.object.isRequired,
artist: PropTypes.object.isRequired,
seasonNumber: PropTypes.number.isRequired,
episodeNumber: PropTypes.number.isRequired,
absoluteEpisodeNumber: PropTypes.number,

@ -17,12 +17,6 @@ function MissingRow(props) {
id,
// trackFileId,
artist,
// seasonNumber,
// episodeNumber,
// absoluteEpisodeNumber,
// sceneSeasonNumber,
// sceneEpisodeNumber,
// sceneAbsoluteEpisodeNumber,
releaseDate,
title,
isSelected,
@ -70,7 +64,6 @@ function MissingRow(props) {
// seasonNumber={seasonNumber}
// episodeNumber={episodeNumber}
// absoluteEpisodeNumber={absoluteEpisodeNumber}
// seriesType={series.seriesType}
// sceneSeasonNumber={sceneSeasonNumber}
// sceneEpisodeNumber={sceneEpisodeNumber}
// sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber}
@ -141,12 +134,6 @@ MissingRow.propTypes = {
id: PropTypes.number.isRequired,
// trackFileId: PropTypes.number,
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,
title: PropTypes.string.isRequired,
isSelected: PropTypes.bool,

@ -42,13 +42,13 @@ namespace Lidarr.Api.V3.Albums
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))
.ToList();
return MapToResource(_albumService.GetAlbums(episodeIds), false);
return MapToResource(_albumService.GetAlbums(albumIds), false);
}
private Response SetAlbumMonitored(int id)

Loading…
Cancel
Save