mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
Translations and some cleanup for extra files and movie editor tables
This commit is contained in:
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import Table from 'Components/Table/Table';
|
||||
import TableBody from 'Components/Table/TableBody';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import MovieFileEditorRow from './MovieFileEditorRow';
|
||||
import styles from './MovieFileEditorTableContent.css';
|
||||
|
||||
@@ -22,7 +23,7 @@ class MovieFileEditorTableContent extends Component {
|
||||
{
|
||||
!items.length &&
|
||||
<div className={styles.blankpad}>
|
||||
No movie files to manage.
|
||||
{translate('NoMovieFilesToManage')}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,7 @@ function createMapStateToProps() {
|
||||
) => {
|
||||
const languages = languageProfiles.items;
|
||||
const qualities = getQualities(qualityProfiles.schema.items);
|
||||
const filesForMovie = movieFiles.items.filter((obj) => {
|
||||
return obj.movieId === movieId;
|
||||
});
|
||||
const filesForMovie = movieFiles.items.filter((file) => file.movieId === movieId);
|
||||
|
||||
return {
|
||||
items: filesForMovie,
|
||||
@@ -42,11 +40,11 @@ function createMapStateToProps() {
|
||||
|
||||
function createMapDispatchToProps(dispatch, props) {
|
||||
return {
|
||||
dispatchFetchQualityProfileSchema(name, path) {
|
||||
dispatchFetchQualityProfileSchema() {
|
||||
dispatch(fetchQualityProfileSchema());
|
||||
},
|
||||
|
||||
dispatchFetchLanguages(name, path) {
|
||||
dispatchFetchLanguages() {
|
||||
dispatch(fetchLanguages());
|
||||
},
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class ExtraFileTableContent extends Component {
|
||||
{
|
||||
!items.length &&
|
||||
<div className={styles.blankpad}>
|
||||
No extra files to manage.
|
||||
{translate('NoExtraFilesToManage')}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -14,9 +14,7 @@ function createMapStateToProps() {
|
||||
movieId,
|
||||
extraFiles
|
||||
) => {
|
||||
const filesForMovie = extraFiles.items.filter((obj) => {
|
||||
return obj.movieId === movieId;
|
||||
});
|
||||
const filesForMovie = extraFiles.items.filter((file) => file.movieId === movieId);
|
||||
|
||||
return {
|
||||
items: filesForMovie,
|
||||
@@ -26,11 +24,6 @@ function createMapStateToProps() {
|
||||
);
|
||||
}
|
||||
|
||||
function createMapDispatchToProps(dispatch, props) {
|
||||
return {
|
||||
};
|
||||
}
|
||||
|
||||
class ExtraFileTableContentConnector extends Component {
|
||||
|
||||
//
|
||||
@@ -53,4 +46,4 @@ ExtraFileTableContentConnector.propTypes = {
|
||||
movieId: PropTypes.number.isRequired
|
||||
};
|
||||
|
||||
export default connect(createMapStateToProps, createMapDispatchToProps)(ExtraFileTableContentConnector);
|
||||
export default connect(createMapStateToProps, null)(ExtraFileTableContentConnector);
|
||||
|
||||
Reference in New Issue
Block a user