mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-27 22:56:45 -04:00
New: Add/remove individual albums
This commit is contained in:
@@ -611,7 +611,11 @@ class ArtistDetails extends Component {
|
||||
</div>
|
||||
|
||||
<div className={styles.metadataMessage}>
|
||||
Missing Albums, Singles, or Other Types? Modify or Create a New <Link to='/settings/profiles'> Metadata Profile</Link>!
|
||||
Missing Albums, Singles, or Other Types? Modify or create a new
|
||||
<Link to='/settings/profiles'> Metadata Profile </Link>
|
||||
or manually
|
||||
<Link to={`/add/search?term=${encodeURIComponent(artistName)}`}> Search </Link>
|
||||
for new items!
|
||||
</div>
|
||||
|
||||
<OrganizePreviewModalConnector
|
||||
|
||||
@@ -28,13 +28,15 @@ const selectAlbums = createSelector(
|
||||
|
||||
const hasAlbums = !!items.length;
|
||||
const hasMonitoredAlbums = items.some((e) => e.monitored);
|
||||
const albumTypes = _.uniq(_.map(items, 'albumType'));
|
||||
|
||||
return {
|
||||
isAlbumsFetching: isFetching,
|
||||
isAlbumsPopulated: isPopulated,
|
||||
albumsError: error,
|
||||
hasAlbums,
|
||||
hasMonitoredAlbums
|
||||
hasMonitoredAlbums,
|
||||
albumTypes
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -65,20 +67,12 @@ function createMapStateToProps() {
|
||||
(state, { foreignArtistId }) => foreignArtistId,
|
||||
selectAlbums,
|
||||
selectTrackFiles,
|
||||
(state) => state.settings.metadataProfiles,
|
||||
createAllArtistSelector(),
|
||||
createCommandsSelector(),
|
||||
(foreignArtistId, albums, trackFiles, metadataProfiles, allArtists, commands) => {
|
||||
(foreignArtistId, albums, trackFiles, allArtists, commands) => {
|
||||
const sortedArtist = _.orderBy(allArtists, 'sortName');
|
||||
const artistIndex = _.findIndex(sortedArtist, { foreignArtistId });
|
||||
const artist = sortedArtist[artistIndex];
|
||||
const metadataProfile = _.find(metadataProfiles.items, { id: artist.metadataProfileId });
|
||||
const albumTypes = _.reduce(metadataProfile.primaryAlbumTypes, (acc, primaryType) => {
|
||||
if (primaryType.allowed) {
|
||||
acc.push(primaryType.albumType.name);
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
if (!artist) {
|
||||
return {};
|
||||
@@ -89,7 +83,8 @@ function createMapStateToProps() {
|
||||
isAlbumsPopulated,
|
||||
albumsError,
|
||||
hasAlbums,
|
||||
hasMonitoredAlbums
|
||||
hasMonitoredAlbums,
|
||||
albumTypes
|
||||
} = albums;
|
||||
|
||||
const {
|
||||
|
||||
@@ -3,3 +3,7 @@
|
||||
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.labelIcon {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import { inputTypes, kinds } from 'Helpers/Props';
|
||||
import { icons, inputTypes, kinds, tooltipPositions } from 'Helpers/Props';
|
||||
import Button from 'Components/Link/Button';
|
||||
import SpinnerButton from 'Components/Link/SpinnerButton';
|
||||
import ModalContent from 'Components/Modal/ModalContent';
|
||||
@@ -11,7 +11,10 @@ import Form from 'Components/Form/Form';
|
||||
import FormGroup from 'Components/Form/FormGroup';
|
||||
import FormLabel from 'Components/Form/FormLabel';
|
||||
import FormInputGroup from 'Components/Form/FormInputGroup';
|
||||
import Icon from 'Components/Icon';
|
||||
import Popover from 'Components/Tooltip/Popover';
|
||||
import MoveArtistModal from 'Artist/MoveArtist/MoveArtistModal';
|
||||
import ArtistMetadataProfilePopoverContent from 'AddArtist/ArtistMetadataProfilePopoverContent';
|
||||
import styles from './EditArtistModalContent.css';
|
||||
|
||||
class EditArtistModalContent extends Component {
|
||||
@@ -122,12 +125,28 @@ class EditArtistModalContent extends Component {
|
||||
{
|
||||
showMetadataProfile &&
|
||||
<FormGroup>
|
||||
<FormLabel>Metadata Profile</FormLabel>
|
||||
<FormLabel>
|
||||
Metadata Profile
|
||||
|
||||
<Popover
|
||||
anchor={
|
||||
<Icon
|
||||
className={styles.labelIcon}
|
||||
name={icons.INFO}
|
||||
/>
|
||||
}
|
||||
title="Metadata Profile"
|
||||
body={<ArtistMetadataProfilePopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
/>
|
||||
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.METADATA_PROFILE_SELECT}
|
||||
name="metadataProfileId"
|
||||
helpText="Changes will take place on next artist refresh"
|
||||
includeNone={true}
|
||||
{...metadataProfileId}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
|
||||
@@ -20,7 +20,7 @@ function NoArtist(props) {
|
||||
return (
|
||||
<div>
|
||||
<div className={styles.message}>
|
||||
No artist found, to get started you'll want to add a new artist or import some existing ones.
|
||||
No artist found, to get started you'll want to add a new artist or album or import some existing ones.
|
||||
</div>
|
||||
|
||||
<div className={styles.buttonContainer}>
|
||||
@@ -34,7 +34,7 @@ function NoArtist(props) {
|
||||
|
||||
<div className={styles.buttonContainer}>
|
||||
<Button
|
||||
to="/add/new"
|
||||
to="/add/search"
|
||||
kind={kinds.PRIMARY}
|
||||
>
|
||||
Add New Artist
|
||||
|
||||
Reference in New Issue
Block a user