mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Fixed: Misc UI/Test Fixes
This commit is contained in:
@@ -25,23 +25,23 @@
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.searchForMissingEpisodesLabelContainer {
|
||||
.searchForMissingMovieLabelContainer {
|
||||
display: flex;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.searchForMissingEpisodesLabel {
|
||||
.searchForMissingMovieLabel {
|
||||
margin-right: 8px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.searchForMissingEpisodesContainer {
|
||||
.searchForMissingMovieContainer {
|
||||
composes: container from '~Components/Form/CheckInput.css';
|
||||
|
||||
flex: 0 1 0;
|
||||
}
|
||||
|
||||
.searchForMissingEpisodesInput {
|
||||
.searchForMissingMovieInput {
|
||||
composes: input from '~Components/Form/CheckInput.css';
|
||||
|
||||
margin-top: 0;
|
||||
|
||||
@@ -23,15 +23,15 @@ class AddNewMovieModalContent extends Component {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
searchForMissingEpisodes: false
|
||||
searchForMovie: false
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onSearchForMissingEpisodesChange = ({ value }) => {
|
||||
this.setState({ searchForMissingEpisodes: value });
|
||||
onSearchForMissingMovieChange = ({ value }) => {
|
||||
this.setState({ searchForMovie: value });
|
||||
}
|
||||
|
||||
onQualityProfileIdChange = ({ value }) => {
|
||||
@@ -39,7 +39,7 @@ class AddNewMovieModalContent extends Component {
|
||||
}
|
||||
|
||||
onAddMoviePress = () => {
|
||||
this.props.onAddMoviePress(this.state.searchForMissingEpisodes);
|
||||
this.props.onAddMoviePress(this.state.searchForMovie);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -142,17 +142,17 @@ class AddNewMovieModalContent extends Component {
|
||||
</ModalBody>
|
||||
|
||||
<ModalFooter className={styles.modalFooter}>
|
||||
<label className={styles.searchForMissingEpisodesLabelContainer}>
|
||||
<span className={styles.searchForMissingEpisodesLabel}>
|
||||
<label className={styles.searchForMissingMovieLabelContainer}>
|
||||
<span className={styles.searchForMissingMovieLabel}>
|
||||
Start search for missing movie
|
||||
</span>
|
||||
|
||||
<CheckInput
|
||||
containerClassName={styles.searchForMissingEpisodesContainer}
|
||||
className={styles.searchForMissingEpisodesInput}
|
||||
name="searchForMissingEpisodes"
|
||||
value={this.state.searchForMissingEpisodes}
|
||||
onChange={this.onSearchForMissingEpisodesChange}
|
||||
containerClassName={styles.searchForMissingMovieContainer}
|
||||
className={styles.searchForMissingMovieInput}
|
||||
name="searchForMovie"
|
||||
value={this.state.searchForMovie}
|
||||
onChange={this.onSearchForMissingMovieChange}
|
||||
/>
|
||||
</label>
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class AddNewMovieModalContentConnector extends Component {
|
||||
this.props.setAddMovieDefault({ [name]: value });
|
||||
}
|
||||
|
||||
onAddMoviePress = (searchForMissingEpisodes) => {
|
||||
onAddMoviePress = (searchForMovie) => {
|
||||
const {
|
||||
tmdbId,
|
||||
rootFolderPath,
|
||||
@@ -65,7 +65,7 @@ class AddNewMovieModalContentConnector extends Component {
|
||||
monitor: monitor.value,
|
||||
qualityProfileId: qualityProfileId.value,
|
||||
tags: tags.value,
|
||||
searchForMissingEpisodes
|
||||
searchForMovie
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@ class MovieDetails extends Component {
|
||||
monitored,
|
||||
studio,
|
||||
overview,
|
||||
youTubeTrailerId,
|
||||
inCinemas,
|
||||
images,
|
||||
alternateTitles,
|
||||
@@ -426,6 +427,7 @@ class MovieDetails extends Component {
|
||||
<MovieDetailsLinks
|
||||
tmdbId={tmdbId}
|
||||
imdbId={imdbId}
|
||||
youTubeTrailerId={youTubeTrailerId}
|
||||
/>
|
||||
}
|
||||
</span>
|
||||
@@ -551,6 +553,7 @@ MovieDetails.propTypes = {
|
||||
monitored: PropTypes.bool.isRequired,
|
||||
status: PropTypes.string.isRequired,
|
||||
studio: PropTypes.string,
|
||||
youTubeTrailerId: PropTypes.string,
|
||||
inCinemas: PropTypes.string.isRequired,
|
||||
overview: PropTypes.string.isRequired,
|
||||
images: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
|
||||
@@ -8,7 +8,8 @@ import styles from './MovieDetailsLinks.css';
|
||||
function MovieDetailsLinks(props) {
|
||||
const {
|
||||
tmdbId,
|
||||
imdbId
|
||||
imdbId,
|
||||
youTubeTrailerId
|
||||
} = props;
|
||||
|
||||
return (
|
||||
@@ -28,7 +29,7 @@ function MovieDetailsLinks(props) {
|
||||
|
||||
<Link
|
||||
className={styles.link}
|
||||
to={`http://trakt.tv/search/tvdb/${tmdbId}?id_type=show`}
|
||||
to={`https://trakt.tv/search/tvdb/${tmdbId}?id_type=show`}
|
||||
>
|
||||
<Label
|
||||
className={styles.linkLabel}
|
||||
@@ -43,7 +44,7 @@ function MovieDetailsLinks(props) {
|
||||
!!imdbId &&
|
||||
<Link
|
||||
className={styles.link}
|
||||
to={`http://imdb.com/title/${imdbId}/`}
|
||||
to={`https://imdb.com/title/${imdbId}/`}
|
||||
>
|
||||
<Label
|
||||
className={styles.linkLabel}
|
||||
@@ -54,13 +55,46 @@ function MovieDetailsLinks(props) {
|
||||
</Label>
|
||||
</Link>
|
||||
}
|
||||
|
||||
{
|
||||
!!imdbId &&
|
||||
<Link
|
||||
className={styles.link}
|
||||
to={` https://moviechat.org/${imdbId}/`}
|
||||
>
|
||||
<Label
|
||||
className={styles.linkLabel}
|
||||
kind={kinds.INFO}
|
||||
size={sizes.LARGE}
|
||||
>
|
||||
Movie Chat
|
||||
</Label>
|
||||
</Link>
|
||||
}
|
||||
|
||||
{
|
||||
!!youTubeTrailerId &&
|
||||
<Link
|
||||
className={styles.link}
|
||||
to={` https://www.youtube.com/watch?v=${youTubeTrailerId}/`}
|
||||
>
|
||||
<Label
|
||||
className={styles.linkLabel}
|
||||
kind={kinds.DANGER}
|
||||
size={sizes.LARGE}
|
||||
>
|
||||
Trailer
|
||||
</Label>
|
||||
</Link>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
MovieDetailsLinks.propTypes = {
|
||||
tmdbId: PropTypes.number.isRequired,
|
||||
imdbId: PropTypes.string
|
||||
imdbId: PropTypes.string,
|
||||
youTubeTrailerId: PropTypes.string
|
||||
};
|
||||
|
||||
export default MovieDetailsLinks;
|
||||
|
||||
@@ -74,7 +74,7 @@ class OrganizePreviewModalContent extends Component {
|
||||
isPopulated,
|
||||
error,
|
||||
items,
|
||||
renameEpisodes,
|
||||
renameMovies,
|
||||
standardMovieFormat,
|
||||
path,
|
||||
onModalClose
|
||||
@@ -109,7 +109,7 @@ class OrganizePreviewModalContent extends Component {
|
||||
!isFetching && isPopulated && !items.length &&
|
||||
<div>
|
||||
{
|
||||
renameEpisodes ?
|
||||
renameMovies ?
|
||||
<div>Success! My work is done, no files to rename.</div> :
|
||||
<div>Renaming is disabled, nothing to rename</div>
|
||||
}
|
||||
@@ -191,7 +191,7 @@ OrganizePreviewModalContent.propTypes = {
|
||||
error: PropTypes.object,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
path: PropTypes.string.isRequired,
|
||||
renameEpisodes: PropTypes.bool,
|
||||
renameMovies: PropTypes.bool,
|
||||
standardMovieFormat: PropTypes.string,
|
||||
onOrganizePress: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
|
||||
@@ -19,7 +19,7 @@ function createMapStateToProps() {
|
||||
props.isFetching = organizePreview.isFetching || naming.isFetching;
|
||||
props.isPopulated = organizePreview.isPopulated && naming.isPopulated;
|
||||
props.error = organizePreview.error || naming.error;
|
||||
props.renameEpisodes = naming.item.renameEpisodes;
|
||||
props.renameMovies = naming.item.renameMovies;
|
||||
props.standardMovieFormat = naming.item.standardMovieFormat;
|
||||
props.path = movie.path;
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class Naming extends Component {
|
||||
namingModalOptions
|
||||
} = this.state;
|
||||
|
||||
const renameEpisodes = hasSettings && settings.renameEpisodes.value;
|
||||
const renameMovies = hasSettings && settings.renameMovies.value;
|
||||
|
||||
const standardMovieFormatHelpTexts = [];
|
||||
const standardMovieFormatErrors = [];
|
||||
@@ -112,10 +112,10 @@ class Naming extends Component {
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="renameEpisodes"
|
||||
name="renameMovies"
|
||||
helpText="Radarr will use the existing file name if renaming is disabled"
|
||||
onChange={onInputChange}
|
||||
{...settings.renameEpisodes}
|
||||
{...settings.renameMovies}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
@@ -132,7 +132,7 @@ class Naming extends Component {
|
||||
</FormGroup>
|
||||
|
||||
{
|
||||
renameEpisodes &&
|
||||
renameMovies &&
|
||||
<div>
|
||||
<FormGroup size={sizes.LARGE}>
|
||||
<FormLabel>Standard Movie Format</FormLabel>
|
||||
|
||||
@@ -4,9 +4,15 @@ function getNewMovie(movie, payload) {
|
||||
rootFolderPath,
|
||||
monitor,
|
||||
qualityProfileId,
|
||||
tags
|
||||
tags,
|
||||
searchForMovie = false
|
||||
} = payload;
|
||||
|
||||
const addOptions = {
|
||||
searchForMovie
|
||||
};
|
||||
|
||||
movie.addOptions = addOptions;
|
||||
movie.monitored = monitor === 'true';
|
||||
movie.qualityProfileId = qualityProfileId;
|
||||
movie.rootFolderPath = rootFolderPath;
|
||||
|
||||
Reference in New Issue
Block a user