mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 06:27:08 -04:00
Fixed: Import Movies page crashing on console.error
with non-string values
This commit is contained in:
parent
3ceda1bcda
commit
6b81f92137
5 changed files with 31 additions and 12 deletions
|
@ -81,7 +81,6 @@ ImportMovieRow.propTypes = {
|
|||
selectedMovie: PropTypes.object,
|
||||
isExistingMovie: PropTypes.bool.isRequired,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
queued: PropTypes.bool.isRequired,
|
||||
isSelected: PropTypes.bool,
|
||||
onSelectedChange: PropTypes.func.isRequired,
|
||||
onInputChange: PropTypes.func.isRequired
|
||||
|
|
|
@ -131,7 +131,7 @@ class ImportMovieSelectMovie extends Component {
|
|||
id={this._buttonId}
|
||||
>
|
||||
<Link
|
||||
ref={ref}
|
||||
// ref={ref}
|
||||
className={styles.button}
|
||||
component="div"
|
||||
onPress={this.onPress}
|
||||
|
@ -255,7 +255,7 @@ class ImportMovieSelectMovie extends Component {
|
|||
items.map((item) => {
|
||||
return (
|
||||
<ImportMovieSearchResultConnector
|
||||
key={item.tvdbId}
|
||||
key={item.tmdbId}
|
||||
tmdbId={item.tmdbId}
|
||||
title={item.title}
|
||||
year={item.year}
|
||||
|
|
|
@ -86,7 +86,7 @@ export const actionHandlers = handleThunks({
|
|||
section,
|
||||
...item,
|
||||
term,
|
||||
queued: true,
|
||||
isQueued: true,
|
||||
items: []
|
||||
}));
|
||||
|
||||
|
@ -151,6 +151,8 @@ export const actionHandlers = handleThunks({
|
|||
abortCurrentLookup = abortRequest;
|
||||
|
||||
request.done((data) => {
|
||||
const selectedMovie = queued.selectedMovie || data[0];
|
||||
|
||||
dispatch(updateItem({
|
||||
section,
|
||||
id: queued.id,
|
||||
|
@ -158,8 +160,8 @@ export const actionHandlers = handleThunks({
|
|||
isPopulated: true,
|
||||
error: null,
|
||||
items: data,
|
||||
queued: false,
|
||||
selectedMovie: queued.selectedMovie || data[0],
|
||||
isQueued: false,
|
||||
selectedMovie,
|
||||
updateOnly: true
|
||||
}));
|
||||
});
|
||||
|
@ -171,7 +173,7 @@ export const actionHandlers = handleThunks({
|
|||
isFetching: false,
|
||||
isPopulated: false,
|
||||
error: xhr,
|
||||
queued: false,
|
||||
isQueued: false,
|
||||
updateOnly: true
|
||||
}));
|
||||
});
|
||||
|
@ -278,7 +280,23 @@ export const actionHandlers = handleThunks({
|
|||
export const reducers = createHandleActions({
|
||||
|
||||
[CANCEL_LOOKUP_MOVIE]: function(state) {
|
||||
return Object.assign({}, state, { isLookingUpMovie: false });
|
||||
queue.splice(0, queue.length);
|
||||
|
||||
const items = state.items.map((item) => {
|
||||
if (item.isQueued) {
|
||||
return {
|
||||
...item,
|
||||
isQueued: false
|
||||
};
|
||||
}
|
||||
|
||||
return item;
|
||||
});
|
||||
|
||||
return Object.assign({}, state, {
|
||||
isLookingUpMovie: false,
|
||||
items
|
||||
});
|
||||
},
|
||||
|
||||
[CLEAR_IMPORT_MOVIE]: function(state) {
|
||||
|
|
|
@ -23,12 +23,13 @@ const error = console.error;
|
|||
function logError(...parameters: any[]) {
|
||||
const filter = parameters.find((parameter) => {
|
||||
return (
|
||||
parameter.includes(
|
||||
typeof parameter === 'string' &&
|
||||
(parameter.includes(
|
||||
'Support for defaultProps will be removed from function components in a future major release'
|
||||
) ||
|
||||
parameter.includes(
|
||||
'findDOMNode is deprecated and will be removed in the next major release'
|
||||
)
|
||||
parameter.includes(
|
||||
'findDOMNode is deprecated and will be removed in the next major release'
|
||||
))
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -975,6 +975,7 @@
|
|||
"MissingMonitoredAndConsideredAvailable": "Missing (Monitored)",
|
||||
"MissingNoItems": "No missing items",
|
||||
"MissingNotMonitored": "Missing (Unmonitored)",
|
||||
"Mixed": "Mixed",
|
||||
"Mode": "Mode",
|
||||
"Monday": "Monday",
|
||||
"Monitor": "Monitor",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue