New: Readarr 0.1

This commit is contained in:
ta264
2020-05-06 21:14:11 +01:00
parent 476f2d6047
commit 08496c82af
911 changed files with 14837 additions and 24442 deletions

View File

@@ -100,7 +100,7 @@ class AddNewItem extends Component {
className={styles.searchInput}
name="searchBox"
value={term}
placeholder="eg. Breaking Benjamin, readarr:854a1807-025b-42a8-ba8c-2a39717f1d25"
placeholder="eg. War and Peace, goodreads:656, isbn:067003469X, asin:B00JCDK5ME"
autoFocus={true}
onChange={this.onSearchInputChange}
/>
@@ -162,8 +162,8 @@ class AddNewItem extends Component {
<div className={styles.noResults}>Couldn't find any results for '{term}'</div>
<div>
You can also search using the
<Link to="https://musicbrainz.org/search"> MusicBrainz ID </Link>
of an artist e.g. readarr:cc197bad-dc9c-440d-a5b5-d52ba2e14234
<Link to="https://goodreads.com"> Goodreads ID </Link>
of a book (e.g. goodreads:656), the isbn (e.g. isbn:067003469X) or the asin (e.g. asin:B00JCDK5ME)
</div>
</div>
}
@@ -171,11 +171,11 @@ class AddNewItem extends Component {
{
!term &&
<div className={styles.message}>
<div className={styles.helpText}>It's easy to add a new artist, just start typing the name of the artist you want to add.</div>
<div className={styles.helpText}>It's easy to add a new author or book, just start typing the name of the item you want to add.</div>
<div>
You can also search using the
<Link to="https://musicbrainz.org/search"> MusicBrainz ID </Link>
of an artist e.g. readarr:cc197bad-dc9c-440d-a5b5-d52ba2e14234
<Link to="https://goodreads.com"> Goodreads ID </Link>
of a book (e.g. goodreads:656), the isbn (e.g. isbn:067003469X) or the asin (e.g. asin:B00JCDK5ME)
</div>
</div>
}

View File

@@ -114,7 +114,7 @@ class AddNewAlbumModalContent extends Component {
<ModalFooter className={styles.modalFooter}>
<label className={styles.searchForNewAlbumLabelContainer}>
<span className={styles.searchForNewAlbumLabel}>
Start search for new album
Start search for new book
</span>
<CheckInput

View File

@@ -82,22 +82,20 @@ class AddNewAlbumModalContentConnector extends Component {
onAddAlbumPress = (searchForNewAlbum) => {
const {
foreignAlbumId,
foreignBookId,
rootFolderPath,
monitor,
qualityProfileId,
metadataProfileId,
albumFolder,
tags
} = this.props;
this.props.addAlbum({
foreignAlbumId,
foreignBookId,
rootFolderPath: rootFolderPath.value,
monitor: monitor.value,
qualityProfileId: qualityProfileId.value,
metadataProfileId: metadataProfileId.value,
albumFolder: albumFolder.value,
tags: tags.value,
searchForNewAlbum
});
@@ -119,13 +117,12 @@ class AddNewAlbumModalContentConnector extends Component {
AddNewAlbumModalContentConnector.propTypes = {
isExistingArtist: PropTypes.bool.isRequired,
foreignAlbumId: PropTypes.string.isRequired,
foreignBookId: PropTypes.string.isRequired,
rootFolderPath: PropTypes.object,
monitor: PropTypes.object.isRequired,
qualityProfileId: PropTypes.object,
metadataProfileId: PropTypes.object,
noneMetadataProfileId: PropTypes.number.isRequired,
albumFolder: PropTypes.object.isRequired,
tags: PropTypes.object.isRequired,
onModalClose: PropTypes.func.isRequired,
setAddDefault: PropTypes.func.isRequired,

View File

@@ -69,16 +69,15 @@ class AddNewAlbumSearchResult extends Component {
render() {
const {
foreignAlbumId,
foreignBookId,
goodreadsId,
titleSlug,
title,
releaseDate,
disambiguation,
albumType,
secondaryTypes,
overview,
ratings,
images,
releases,
artist,
isExistingAlbum,
isExistingArtist,
@@ -89,7 +88,7 @@ class AddNewAlbumSearchResult extends Component {
isNewAddAlbumModalOpen
} = this.state;
const linkProps = isExistingAlbum ? { to: `/album/${foreignAlbumId}` } : { onPress: this.onPress };
const linkProps = isExistingAlbum ? { to: `/book/${titleSlug}` } : { onPress: this.onPress };
const height = calculateHeight(230, isSmallScreen);
@@ -107,6 +106,7 @@ class AddNewAlbumSearchResult extends Component {
className={styles.poster}
images={images}
size={250}
lazy={false}
/>
}
@@ -132,7 +132,7 @@ class AddNewAlbumSearchResult extends Component {
<Link
className={styles.mbLink}
to={`https://musicbrainz.org/release-group/${foreignAlbumId}`}
to={`https://goodreads.com/book/show/${goodreadsId}`}
onPress={this.onMBLinkPress}
>
<Icon
@@ -174,31 +174,6 @@ class AddNewAlbumSearchResult extends Component {
</Label>
}
<Label size={sizes.LARGE}>
{releases.length} release{releases.length > 0 ? 's' : null}
</Label>
{
!!albumType &&
<Label size={sizes.LARGE}>
{albumType}
</Label>
}
{
!!secondaryTypes &&
secondaryTypes.map((item, i) => {
return (
<Label
size={sizes.LARGE}
key={i}
>
{item}
</Label>
);
})
}
</div>
<div
@@ -219,7 +194,7 @@ class AddNewAlbumSearchResult extends Component {
<AddNewAlbumModal
isOpen={isNewAddAlbumModalOpen && !isExistingAlbum}
isExistingArtist={isExistingArtist}
foreignAlbumId={foreignAlbumId}
foreignBookId={foreignBookId}
albumTitle={title}
disambiguation={disambiguation}
artistName={artist.artistName}
@@ -233,17 +208,16 @@ class AddNewAlbumSearchResult extends Component {
}
AddNewAlbumSearchResult.propTypes = {
foreignAlbumId: PropTypes.string.isRequired,
foreignBookId: PropTypes.string.isRequired,
goodreadsId: PropTypes.number.isRequired,
titleSlug: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
releaseDate: PropTypes.string.isRequired,
releaseDate: PropTypes.string,
disambiguation: PropTypes.string,
albumType: PropTypes.string,
secondaryTypes: PropTypes.arrayOf(PropTypes.string).isRequired,
overview: PropTypes.string,
ratings: PropTypes.object.isRequired,
artist: PropTypes.object,
images: PropTypes.arrayOf(PropTypes.object).isRequired,
releases: PropTypes.arrayOf(PropTypes.object).isRequired,
isExistingAlbum: PropTypes.bool.isRequired,
isExistingArtist: PropTypes.bool.isRequired,
isSmallScreen: PropTypes.bool.isRequired

View File

@@ -105,7 +105,7 @@ class AddNewArtistModalContent extends Component {
<ModalFooter className={styles.modalFooter}>
<label className={styles.searchForMissingAlbumsLabelContainer}>
<span className={styles.searchForMissingAlbumsLabel}>
Start search for missing albums
Start search for missing books
</span>
<CheckInput

View File

@@ -54,22 +54,20 @@ class AddNewArtistModalContentConnector extends Component {
onAddArtistPress = (searchForMissingAlbums) => {
const {
foreignArtistId,
foreignAuthorId,
rootFolderPath,
monitor,
qualityProfileId,
metadataProfileId,
albumFolder,
tags
} = this.props;
this.props.addArtist({
foreignArtistId,
foreignAuthorId,
rootFolderPath: rootFolderPath.value,
monitor: monitor.value,
qualityProfileId: qualityProfileId.value,
metadataProfileId: metadataProfileId.value,
albumFolder: albumFolder.value,
tags: tags.value,
searchForMissingAlbums
});
@@ -90,12 +88,11 @@ class AddNewArtistModalContentConnector extends Component {
}
AddNewArtistModalContentConnector.propTypes = {
foreignArtistId: PropTypes.string.isRequired,
foreignAuthorId: PropTypes.string.isRequired,
rootFolderPath: PropTypes.object,
monitor: PropTypes.object.isRequired,
qualityProfileId: PropTypes.object,
metadataProfileId: PropTypes.object,
albumFolder: PropTypes.object.isRequired,
tags: PropTypes.object.isRequired,
onModalClose: PropTypes.func.isRequired,
setAddDefault: PropTypes.func.isRequired,

View File

@@ -68,7 +68,9 @@ class AddNewArtistSearchResult extends Component {
render() {
const {
foreignArtistId,
foreignAuthorId,
goodreadsId,
titleSlug,
artistName,
year,
disambiguation,
@@ -85,7 +87,7 @@ class AddNewArtistSearchResult extends Component {
isNewAddArtistModalOpen
} = this.state;
const linkProps = isExistingArtist ? { to: `/artist/${foreignArtistId}` } : { onPress: this.onPress };
const linkProps = isExistingArtist ? { to: `/author/${titleSlug}` } : { onPress: this.onPress };
const endedString = artistType === 'Person' ? 'Deceased' : 'Ended';
@@ -107,6 +109,7 @@ class AddNewArtistSearchResult extends Component {
images={images}
size={250}
overflow={true}
lazy={false}
/>
}
@@ -140,7 +143,7 @@ class AddNewArtistSearchResult extends Component {
<Link
className={styles.mbLink}
to={`https://musicbrainz.org/artist/${foreignArtistId}`}
to={`https://goodreads.com/author/show/${goodreadsId}`}
onPress={this.onMBLinkPress}
>
<Icon
@@ -196,7 +199,7 @@ class AddNewArtistSearchResult extends Component {
<AddNewArtistModal
isOpen={isNewAddArtistModalOpen && !isExistingArtist}
foreignArtistId={foreignArtistId}
foreignAuthorId={foreignAuthorId}
artistName={artistName}
disambiguation={disambiguation}
year={year}
@@ -210,7 +213,9 @@ class AddNewArtistSearchResult extends Component {
}
AddNewArtistSearchResult.propTypes = {
foreignArtistId: PropTypes.string.isRequired,
foreignAuthorId: PropTypes.string.isRequired,
goodreadsId: PropTypes.number.isRequired,
titleSlug: PropTypes.number.isRequired,
artistName: PropTypes.string.isRequired,
year: PropTypes.number,
disambiguation: PropTypes.string,

View File

@@ -35,7 +35,6 @@ class AddArtistOptionsForm extends Component {
metadataProfileId,
includeNoneMetadataProfile,
showMetadataProfile,
albumFolder,
tags,
onInputChange,
...otherProps
@@ -119,17 +118,6 @@ class AddArtistOptionsForm extends Component {
/>
</FormGroup>
<FormGroup>
<FormLabel>Album Folder</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="albumFolder"
onChange={onInputChange}
{...albumFolder}
/>
</FormGroup>
<FormGroup>
<FormLabel>Tags</FormLabel>
@@ -152,7 +140,6 @@ AddArtistOptionsForm.propTypes = {
metadataProfileId: PropTypes.object,
showMetadataProfile: PropTypes.bool.isRequired,
includeNoneMetadataProfile: PropTypes.bool.isRequired,
albumFolder: PropTypes.object.isRequired,
tags: PropTypes.object.isRequired,
onInputChange: PropTypes.func.isRequired
};