mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-06 04:52:21 -07:00
Fixed eslint errors and re-enabled build.sh check (#150)
* Fixed eslint errors and re-enabled build.sh check * Corrected typo * Corrected typo * Disabled max-params on files with warnings * Fixes for PR comments * Fixes for PR comments * Fixes for PR comments * Fixes for PR comments * Fixes for PR comments * Fixes for PR comments
This commit is contained in:
parent
8116e66d52
commit
9d00a17ade
51 changed files with 84 additions and 103 deletions
2
build.sh
2
build.sh
|
@ -87,7 +87,7 @@ ProgressEnd()
|
||||||
LintUI()
|
LintUI()
|
||||||
{
|
{
|
||||||
ProgressStart 'ESLint'
|
ProgressStart 'ESLint'
|
||||||
# CheckExitCode yarn eslint
|
CheckExitCode yarn eslint
|
||||||
ProgressEnd 'ESLint'
|
ProgressEnd 'ESLint'
|
||||||
|
|
||||||
ProgressStart 'Stylelint'
|
ProgressStart 'Stylelint'
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
"no-undef": "error",
|
"no-undef": "error",
|
||||||
"no-undef-init": "off",
|
"no-undef-init": "off",
|
||||||
"no-undefined": "off",
|
"no-undefined": "off",
|
||||||
"no-unused-vars": ["error", { "args": "none" }],
|
"no-unused-vars": ["warn", { "args": "none" }],
|
||||||
"no-use-before-define": "error",
|
"no-use-before-define": "error",
|
||||||
|
|
||||||
# Node.js and CommonJS
|
# Node.js and CommonJS
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
"lines-around-comment": ["error", { "beforeBlockComment": true, "afterBlockComment": false }],
|
"lines-around-comment": ["error", { "beforeBlockComment": true, "afterBlockComment": false }],
|
||||||
"max-depth": ["error", {"maximum": 5}],
|
"max-depth": ["error", {"maximum": 5}],
|
||||||
"max-nested-callbacks": ["error", 4],
|
"max-nested-callbacks": ["error", 4],
|
||||||
"max-params": ["error", 4],
|
"max-params": ["warn", 4],
|
||||||
"max-statements": "off",
|
"max-statements": "off",
|
||||||
"max-statements-per-line": ["error", { "max": 1 }],
|
"max-statements-per-line": ["error", { "max": 1 }],
|
||||||
"new-cap": ["error", {"capIsNewExceptions": ["$.Deferred"]}],
|
"new-cap": ["error", {"capIsNewExceptions": ["$.Deferred"]}],
|
||||||
|
|
|
@ -36,7 +36,7 @@ class BlacklistConnector extends Component {
|
||||||
// Lifecycle
|
// Lifecycle
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
registerPagePopulator(this.repopulate);
|
registerPagePopulator(this.repopulate);
|
||||||
this.props.gotoBlacklistFirstPage();
|
this.props.gotoBlacklistFirstPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ class Queue extends Component {
|
||||||
isPendingSelected
|
isPendingSelected
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
const isRefreshing = isFetching || isAlbumsFetching || isCheckForFinishedDownloadExecuting;
|
const isRefreshing = isFetching || isAlbumsFetching || isCheckForFinishedDownloadExecuting;
|
||||||
const isAllPopulated = isPopulated && (isAlbumsPopulated || !items.length);
|
const isAllPopulated = isPopulated && (isAlbumsPopulated || !items.length);
|
||||||
const hasError = error || episodesError;
|
const hasError = error || episodesError;
|
||||||
const selectedCount = this.getSelectedIds().length;
|
const selectedCount = this.getSelectedIds().length;
|
||||||
|
|
|
@ -10,7 +10,6 @@ import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||||
import ProtocolLabel from 'Activity/Queue/ProtocolLabel';
|
import ProtocolLabel from 'Activity/Queue/ProtocolLabel';
|
||||||
import EpisodeTitleLink from 'Album/EpisodeTitleLink';
|
import EpisodeTitleLink from 'Album/EpisodeTitleLink';
|
||||||
import EpisodeQuality from 'Album/EpisodeQuality';
|
import EpisodeQuality from 'Album/EpisodeQuality';
|
||||||
import SeasonEpisodeNumber from 'Album/SeasonEpisodeNumber';
|
|
||||||
import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal';
|
import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal';
|
||||||
import ArtistNameLink from 'Artist/ArtistNameLink';
|
import ArtistNameLink from 'Artist/ArtistNameLink';
|
||||||
import QueueStatusCell from './QueueStatusCell';
|
import QueueStatusCell from './QueueStatusCell';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import formatTime from 'Utilities/Date/formatTime';
|
|
||||||
import isInNextWeek from 'Utilities/Date/isInNextWeek';
|
import isInNextWeek from 'Utilities/Date/isInNextWeek';
|
||||||
import isToday from 'Utilities/Date/isToday';
|
import isToday from 'Utilities/Date/isToday';
|
||||||
import isTomorrow from 'Utilities/Date/isTomorrow';
|
import isTomorrow from 'Utilities/Date/isTomorrow';
|
||||||
|
@ -13,8 +12,7 @@ function EpisodeAiring(props) {
|
||||||
releaseDate,
|
releaseDate,
|
||||||
albumLabel,
|
albumLabel,
|
||||||
shortDateFormat,
|
shortDateFormat,
|
||||||
showRelativeDates,
|
showRelativeDates
|
||||||
timeFormat
|
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const networkLabel = (
|
const networkLabel = (
|
||||||
|
@ -77,8 +75,7 @@ EpisodeAiring.propTypes = {
|
||||||
releaseDate: PropTypes.string.isRequired,
|
releaseDate: PropTypes.string.isRequired,
|
||||||
albumLabel: PropTypes.arrayOf(PropTypes.string).isRequired,
|
albumLabel: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||||
shortDateFormat: PropTypes.string.isRequired,
|
shortDateFormat: PropTypes.string.isRequired,
|
||||||
showRelativeDates: PropTypes.bool.isRequired,
|
showRelativeDates: PropTypes.bool.isRequired
|
||||||
timeFormat: PropTypes.string.isRequired
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default EpisodeAiring;
|
export default EpisodeAiring;
|
||||||
|
|
|
@ -10,8 +10,7 @@ function createMapStateToProps() {
|
||||||
(uiSettings) => {
|
(uiSettings) => {
|
||||||
return _.pick(uiSettings, [
|
return _.pick(uiSettings, [
|
||||||
'shortDateFormat',
|
'shortDateFormat',
|
||||||
'showRelativeDates',
|
'showRelativeDates'
|
||||||
'timeFormat'
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import formatBytes from 'Utilities/Number/formatBytes';
|
import { kinds, sizes } from 'Helpers/Props';
|
||||||
import { icons, kinds, sizes } from 'Helpers/Props';
|
|
||||||
import IconButton from 'Components/Link/IconButton';
|
|
||||||
import ConfirmModal from 'Components/Modal/ConfirmModal';
|
import ConfirmModal from 'Components/Modal/ConfirmModal';
|
||||||
import Label from 'Components/Label';
|
import Label from 'Components/Label';
|
||||||
import QualityProfileNameConnector from 'Settings/Profiles/Quality/QualityProfileNameConnector';
|
import QualityProfileNameConnector from 'Settings/Profiles/Quality/QualityProfileNameConnector';
|
||||||
import EpisodeQuality from 'Album/EpisodeQuality';
|
|
||||||
import Table from 'Components/Table/Table';
|
import Table from 'Components/Table/Table';
|
||||||
import TableBody from 'Components/Table/TableBody';
|
import TableBody from 'Components/Table/TableBody';
|
||||||
import EpisodeAiringConnector from './EpisodeAiringConnector';
|
import EpisodeAiringConnector from './EpisodeAiringConnector';
|
||||||
|
|
|
@ -14,14 +14,15 @@ function createMapStateToProps() {
|
||||||
createEpisodeSelector(),
|
createEpisodeSelector(),
|
||||||
createCommandsSelector(),
|
createCommandsSelector(),
|
||||||
createDimensionsSelector(),
|
createDimensionsSelector(),
|
||||||
(tracks, episode, commands, dimensions) => {
|
createArtistSelector(),
|
||||||
|
(tracks, episode, commands, dimensions, artist) => {
|
||||||
const filteredItems = _.filter(tracks.items, { albumId: episode.id });
|
const filteredItems = _.filter(tracks.items, { albumId: episode.id });
|
||||||
const mediumSortedItems = _.orderBy(filteredItems, 'absoluteTrackNumber');
|
const mediumSortedItems = _.orderBy(filteredItems, 'absoluteTrackNumber');
|
||||||
const items = _.orderBy(mediumSortedItems, 'mediumNumber');
|
const items = _.orderBy(mediumSortedItems, 'mediumNumber');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
network: episode.label,
|
network: episode.label,
|
||||||
qualityProfileId: episode.profileId,
|
qualityProfileId: artist.qualityProfileId,
|
||||||
releaseDate: episode.releaseDate,
|
releaseDate: episode.releaseDate,
|
||||||
overview: episode.overview,
|
overview: episode.overview,
|
||||||
items,
|
items,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import padNumber from 'Utilities/Number/padNumber';
|
|
||||||
import MonitorToggleButton from 'Components/MonitorToggleButton';
|
import MonitorToggleButton from 'Components/MonitorToggleButton';
|
||||||
import styles from './AlbumStudioAlbum.css';
|
import styles from './AlbumStudioAlbum.css';
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,6 @@ AlbumRow.propTypes = {
|
||||||
artistMonitored: PropTypes.bool.isRequired,
|
artistMonitored: PropTypes.bool.isRequired,
|
||||||
statistics: PropTypes.object.isRequired,
|
statistics: PropTypes.object.isRequired,
|
||||||
mediaInfo: PropTypes.object,
|
mediaInfo: PropTypes.object,
|
||||||
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
||||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
onMonitorAlbumPress: PropTypes.func.isRequired
|
onMonitorAlbumPress: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,13 +14,10 @@ function createMapStateToProps() {
|
||||||
createTrackFileSelector(),
|
createTrackFileSelector(),
|
||||||
createCommandsSelector(),
|
createCommandsSelector(),
|
||||||
(id, sceneSeasonNumber, artist, trackFile, commands) => {
|
(id, sceneSeasonNumber, artist, trackFile, commands) => {
|
||||||
const alternateTitles = sceneSeasonNumber ? _.filter(artist.alternateTitles, { sceneSeasonNumber }) : [];
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
artistMonitored: artist.monitored,
|
artistMonitored: artist.monitored,
|
||||||
trackFilePath: trackFile ? trackFile.path : null,
|
trackFilePath: trackFile ? trackFile.path : null,
|
||||||
trackFileRelativePath: trackFile ? trackFile.relativePath : null,
|
trackFileRelativePath: trackFile ? trackFile.relativePath : null
|
||||||
alternateTitles
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -187,7 +187,6 @@ class ArtistDetails extends Component {
|
||||||
overview,
|
overview,
|
||||||
links,
|
links,
|
||||||
images,
|
images,
|
||||||
albums,
|
|
||||||
alternateTitles,
|
alternateTitles,
|
||||||
tags,
|
tags,
|
||||||
isRefreshing,
|
isRefreshing,
|
||||||
|
@ -595,7 +594,6 @@ ArtistDetails.propTypes = {
|
||||||
overview: PropTypes.string.isRequired,
|
overview: PropTypes.string.isRequired,
|
||||||
links: PropTypes.arrayOf(PropTypes.object).isRequired,
|
links: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
images: PropTypes.arrayOf(PropTypes.object).isRequired,
|
images: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
albums: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
||||||
alternateTitles: PropTypes.arrayOf(PropTypes.string).isRequired,
|
alternateTitles: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||||
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||||
isRefreshing: PropTypes.bool.isRequired,
|
isRefreshing: PropTypes.bool.isRequired,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
|
@ -43,7 +43,7 @@ function ArtistDetailsLinks(props) {
|
||||||
</Label>
|
</Label>
|
||||||
</Link>
|
</Link>
|
||||||
{(index > 0 && index % 5 === 0) &&
|
{(index > 0 && index % 5 === 0) &&
|
||||||
<br></br>
|
<br />
|
||||||
}
|
}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -2,18 +2,11 @@ import _ from 'lodash';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import isAfter from 'Utilities/Date/isAfter';
|
import isAfter from 'Utilities/Date/isAfter';
|
||||||
import isBefore from 'Utilities/Date/isBefore';
|
|
||||||
import getToggledRange from 'Utilities/Table/getToggledRange';
|
import getToggledRange from 'Utilities/Table/getToggledRange';
|
||||||
import { align, icons, kinds, sizes } from 'Helpers/Props';
|
import { icons } from 'Helpers/Props';
|
||||||
import Icon from 'Components/Icon';
|
import Icon from 'Components/Icon';
|
||||||
import IconButton from 'Components/Link/IconButton';
|
import IconButton from 'Components/Link/IconButton';
|
||||||
import Link from 'Components/Link/Link';
|
import Link from 'Components/Link/Link';
|
||||||
import SpinnerIcon from 'Components/SpinnerIcon';
|
|
||||||
import SpinnerIconButton from 'Components/Link/SpinnerIconButton';
|
|
||||||
import Menu from 'Components/Menu/Menu';
|
|
||||||
import MenuButton from 'Components/Menu/MenuButton';
|
|
||||||
import MenuContent from 'Components/Menu/MenuContent';
|
|
||||||
import MenuItem from 'Components/Menu/MenuItem';
|
|
||||||
import Table from 'Components/Table/Table';
|
import Table from 'Components/Table/Table';
|
||||||
import TableBody from 'Components/Table/TableBody';
|
import TableBody from 'Components/Table/TableBody';
|
||||||
import TrackFileEditorModal from 'TrackFile/Editor/TrackFileEditorModal';
|
import TrackFileEditorModal from 'TrackFile/Editor/TrackFileEditorModal';
|
||||||
|
@ -119,13 +112,10 @@ class ArtistDetailsSeason extends Component {
|
||||||
label,
|
label,
|
||||||
items,
|
items,
|
||||||
columns,
|
columns,
|
||||||
isSaving,
|
|
||||||
isExpanded,
|
isExpanded,
|
||||||
isSearching,
|
|
||||||
artistMonitored,
|
artistMonitored,
|
||||||
isSmallScreen,
|
isSmallScreen,
|
||||||
onTableOptionChange,
|
onTableOptionChange
|
||||||
onSearchPress
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -237,15 +227,12 @@ ArtistDetailsSeason.propTypes = {
|
||||||
label: PropTypes.string.isRequired,
|
label: PropTypes.string.isRequired,
|
||||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
isSaving: PropTypes.bool,
|
|
||||||
isExpanded: PropTypes.bool,
|
isExpanded: PropTypes.bool,
|
||||||
isSearching: PropTypes.bool.isRequired,
|
|
||||||
artistMonitored: PropTypes.bool.isRequired,
|
artistMonitored: PropTypes.bool.isRequired,
|
||||||
isSmallScreen: PropTypes.bool.isRequired,
|
isSmallScreen: PropTypes.bool.isRequired,
|
||||||
onTableOptionChange: PropTypes.func.isRequired,
|
onTableOptionChange: PropTypes.func.isRequired,
|
||||||
onExpandPress: PropTypes.func.isRequired,
|
onExpandPress: PropTypes.func.isRequired,
|
||||||
onMonitorAlbumPress: PropTypes.func.isRequired,
|
onMonitorAlbumPress: PropTypes.func.isRequired
|
||||||
onSearchPress: PropTypes.func.isRequired
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ArtistDetailsSeason;
|
export default ArtistDetailsSeason;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
@ -20,11 +21,6 @@ function createMapStateToProps() {
|
||||||
createCommandsSelector(),
|
createCommandsSelector(),
|
||||||
createDimensionsSelector(),
|
createDimensionsSelector(),
|
||||||
(label, episodes, artist, commands, dimensions) => {
|
(label, episodes, artist, commands, dimensions) => {
|
||||||
const isSearching = !!findCommand(commands, {
|
|
||||||
name: commandNames.SEASON_SEARCH,
|
|
||||||
artistId: artist.id,
|
|
||||||
label
|
|
||||||
});
|
|
||||||
|
|
||||||
const episodesInSeason = _.filter(episodes.items, { albumType: label });
|
const episodesInSeason = _.filter(episodes.items, { albumType: label });
|
||||||
const sortedEpisodes = _.orderBy(episodesInSeason, 'releaseDate', 'desc');
|
const sortedEpisodes = _.orderBy(episodesInSeason, 'releaseDate', 'desc');
|
||||||
|
@ -32,7 +28,6 @@ function createMapStateToProps() {
|
||||||
return {
|
return {
|
||||||
items: sortedEpisodes,
|
items: sortedEpisodes,
|
||||||
columns: episodes.columns,
|
columns: episodes.columns,
|
||||||
isSearching,
|
|
||||||
artistMonitored: artist.monitored,
|
artistMonitored: artist.monitored,
|
||||||
isSmallScreen: dimensions.isSmallScreen
|
isSmallScreen: dimensions.isSmallScreen
|
||||||
};
|
};
|
||||||
|
@ -55,17 +50,6 @@ class ArtistDetailsSeasonConnector extends Component {
|
||||||
this.props.setEpisodesTableOption(payload);
|
this.props.setEpisodesTableOption(payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
onSearchPress = () => {
|
|
||||||
const {
|
|
||||||
artistId
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
this.props.executeCommand({
|
|
||||||
name: commandNames.SEASON_SEARCH,
|
|
||||||
artistId
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMonitorAlbumPress = (albumIds, monitored) => {
|
onMonitorAlbumPress = (albumIds, monitored) => {
|
||||||
this.props.toggleEpisodesMonitored({
|
this.props.toggleEpisodesMonitored({
|
||||||
albumIds,
|
albumIds,
|
||||||
|
@ -81,8 +65,6 @@ class ArtistDetailsSeasonConnector extends Component {
|
||||||
<ArtistDetailsSeason
|
<ArtistDetailsSeason
|
||||||
{...this.props}
|
{...this.props}
|
||||||
onTableOptionChange={this.onTableOptionChange}
|
onTableOptionChange={this.onTableOptionChange}
|
||||||
onMonitorSeasonPress={this.onMonitorSeasonPress}
|
|
||||||
onSearchPress={this.onSearchPress}
|
|
||||||
onMonitorAlbumPress={this.onMonitorAlbumPress}
|
onMonitorAlbumPress={this.onMonitorAlbumPress}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import titleCase from 'Utilities/String/titleCase';
|
|
||||||
import TagListConnector from 'Components/TagListConnector';
|
import TagListConnector from 'Components/TagListConnector';
|
||||||
import CheckInput from 'Components/Form/CheckInput';
|
import CheckInput from 'Components/Form/CheckInput';
|
||||||
import TableRow from 'Components/Table/TableRow';
|
import TableRow from 'Components/Table/TableRow';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import getRelativeDate from 'Utilities/Date/getRelativeDate';
|
import getRelativeDate from 'Utilities/Date/getRelativeDate';
|
||||||
|
|
|
@ -300,7 +300,7 @@ class ArtistIndexPosters extends Component {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</WindowScroller>
|
</WindowScroller>
|
||||||
</Measure>
|
</Measure>
|
||||||
);
|
);
|
||||||
|
|
|
@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import formatTime from 'Utilities/Date/formatTime';
|
import formatTime from 'Utilities/Date/formatTime';
|
||||||
import padNumber from 'Utilities/Number/padNumber';
|
|
||||||
import { icons } from 'Helpers/Props';
|
import { icons } from 'Helpers/Props';
|
||||||
import getStatusStyle from 'Calendar/getStatusStyle';
|
import getStatusStyle from 'Calendar/getStatusStyle';
|
||||||
import Icon from 'Components/Icon';
|
import Icon from 'Components/Icon';
|
||||||
|
|
|
@ -28,7 +28,8 @@ function CalendarDay(props) {
|
||||||
styles.dayOfMonth,
|
styles.dayOfMonth,
|
||||||
isTodaysDate && styles.isToday,
|
isTodaysDate && styles.isToday,
|
||||||
!moment(date).isSame(moment(time), 'month') && styles.isDifferentMonth
|
!moment(date).isSame(moment(time), 'month') && styles.isDifferentMonth
|
||||||
)}>
|
)}
|
||||||
|
>
|
||||||
{moment(date).date()}
|
{moment(date).date()}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,6 @@ import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { icons } from 'Helpers/Props';
|
import { icons } from 'Helpers/Props';
|
||||||
import formatTime from 'Utilities/Date/formatTime';
|
|
||||||
import padNumber from 'Utilities/Number/padNumber';
|
|
||||||
import getStatusStyle from 'Calendar/getStatusStyle';
|
import getStatusStyle from 'Calendar/getStatusStyle';
|
||||||
import episodeEntities from 'Album/episodeEntities';
|
import episodeEntities from 'Album/episodeEntities';
|
||||||
import Icon from 'Components/Icon';
|
import Icon from 'Components/Icon';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
|
@ -59,7 +59,6 @@ class PageHeader extends Component {
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className={styles.sidebarToggleContainer}>
|
<div className={styles.sidebarToggleContainer}>
|
||||||
<IconButton
|
<IconButton
|
||||||
id="sidebar-toggle-button"
|
id="sidebar-toggle-button"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import CheckInput from 'Components/Form/CheckInput';
|
import CheckInput from 'Components/Form/CheckInput';
|
||||||
|
|
|
@ -75,4 +75,6 @@ TableOptionsColumnDragPreview.propTypes = {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DragLayer(collectDragLayer)(TableOptionsColumnDragPreview);
|
export default DragLayer(collectDragLayer)(TableOptionsColumnDragPreview);
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
|
@ -153,6 +153,7 @@ TableOptionsColumnDragSource.propTypes = {
|
||||||
onColumnDragEnd: PropTypes.func.isRequired
|
onColumnDragEnd: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DropTarget(
|
export default DropTarget(
|
||||||
TABLE_COLUMN,
|
TABLE_COLUMN,
|
||||||
columnDropTarget,
|
columnDropTarget,
|
||||||
|
@ -162,3 +163,4 @@ export default DropTarget(
|
||||||
columnDragSource,
|
columnDragSource,
|
||||||
collectDragSource
|
collectDragSource
|
||||||
)(TableOptionsColumnDragSource));
|
)(TableOptionsColumnDragSource));
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
|
@ -239,4 +239,6 @@ TableOptionsModal.defaultProps = {
|
||||||
canModifyColumns: true
|
canModifyColumns: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DragDropContext(HTML5Backend)(TableOptionsModal);
|
export default DragDropContext(HTML5Backend)(TableOptionsModal);
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
|
@ -145,7 +145,7 @@ class Tooltip extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.propTypes = {
|
Tooltip.propTypes = {
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
anchor: PropTypes.node.isRequired,
|
anchor: PropTypes.node.isRequired,
|
||||||
tooltip: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
|
tooltip: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
|
||||||
kind: PropTypes.oneOf([kinds.DEFAULT, kinds.INVERSE]),
|
kind: PropTypes.oneOf([kinds.DEFAULT, kinds.INVERSE]),
|
||||||
|
|
|
@ -95,9 +95,9 @@ SelectTrackModalContentConnector.propTypes = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connectSection(
|
export default connectSection(
|
||||||
createMapStateToProps,
|
createMapStateToProps,
|
||||||
mapDispatchToProps,
|
mapDispatchToProps,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
{ section: 'tracks' }
|
{ section: 'tracks' }
|
||||||
)(SelectTrackModalContentConnector);
|
)(SelectTrackModalContentConnector);
|
||||||
|
|
|
@ -20,7 +20,7 @@ function createMapStateToProps() {
|
||||||
props.isPopulated = organizePreview.isPopulated && naming.isPopulated;
|
props.isPopulated = organizePreview.isPopulated && naming.isPopulated;
|
||||||
props.error = organizePreview.error || naming.error;
|
props.error = organizePreview.error || naming.error;
|
||||||
props.renameTracks = naming.item.renameTracks;
|
props.renameTracks = naming.item.renameTracks;
|
||||||
props.trackFormat = naming.item['standardTrackFormat'];
|
props.trackFormat = naming.item.standardTrackFormat;
|
||||||
props.path = artist.path;
|
props.path = artist.path;
|
||||||
|
|
||||||
return props;
|
return props;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { inputTypes, sizes } from 'Helpers/Props';
|
import { inputTypes } from 'Helpers/Props';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
import FieldSet from 'Components/FieldSet';
|
import FieldSet from 'Components/FieldSet';
|
||||||
import Form from 'Components/Form/Form';
|
import Form from 'Components/Form/Form';
|
||||||
|
@ -35,26 +35,26 @@ function MetadataProvider(props) {
|
||||||
hasSettings && !isFetching && !error &&
|
hasSettings && !isFetching && !error &&
|
||||||
<Form>
|
<Form>
|
||||||
{
|
{
|
||||||
advancedSettings &&
|
advancedSettings &&
|
||||||
<FieldSet
|
<FieldSet
|
||||||
legend="Metadata Provider Source"
|
legend="Metadata Provider Source"
|
||||||
>
|
>
|
||||||
<FormGroup
|
<FormGroup
|
||||||
advancedSettings={advancedSettings}
|
advancedSettings={advancedSettings}
|
||||||
isAdvanced={true}
|
isAdvanced={true}
|
||||||
>
|
>
|
||||||
<FormLabel>Metadata Source</FormLabel>
|
<FormLabel>Metadata Source</FormLabel>
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.TEXT}
|
type={inputTypes.TEXT}
|
||||||
name="metadataSource"
|
name="metadataSource"
|
||||||
helpText="Alternative Metadata Source (Leave blank for default)"
|
helpText="Alternative Metadata Source (Leave blank for default)"
|
||||||
helpLink="https://github.com/Lidarr/Lidarr/wiki/Metadata-Source"
|
helpLink="https://github.com/Lidarr/Lidarr/wiki/Metadata-Source"
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
{...settings.metadataSource}
|
{...settings.metadataSource}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</FieldSet>
|
</FieldSet>
|
||||||
}
|
}
|
||||||
</Form>
|
</Form>
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,4 +75,7 @@ DelayProfileDragPreview.propTypes = {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DragLayer(collectDragLayer)(DelayProfileDragPreview);
|
export default DragLayer(collectDragLayer)(DelayProfileDragPreview);
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,7 @@ DelayProfileDragSource.propTypes = {
|
||||||
onDelayProfileDragEnd: PropTypes.func.isRequired
|
onDelayProfileDragEnd: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DropTarget(
|
export default DropTarget(
|
||||||
DELAY_PROFILE,
|
DELAY_PROFILE,
|
||||||
delayProfileDropTarget,
|
delayProfileDropTarget,
|
||||||
|
@ -146,3 +147,4 @@ export default DropTarget(
|
||||||
delayProfileDragSource,
|
delayProfileDragSource,
|
||||||
collectDragSource
|
collectDragSource
|
||||||
)(DelayProfileDragSource));
|
)(DelayProfileDragSource));
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
|
@ -85,4 +85,6 @@ LanguageProfileItemDragPreview.propTypes = {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DragLayer(collectDragLayer)(LanguageProfileItemDragPreview);
|
export default DragLayer(collectDragLayer)(LanguageProfileItemDragPreview);
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
|
@ -146,6 +146,7 @@ LanguageProfileItemDragSource.propTypes = {
|
||||||
onLanguageProfileItemDragEnd: PropTypes.func.isRequired
|
onLanguageProfileItemDragEnd: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DropTarget(
|
export default DropTarget(
|
||||||
QUALITY_PROFILE_ITEM,
|
QUALITY_PROFILE_ITEM,
|
||||||
languageProfileItemDropTarget,
|
languageProfileItemDropTarget,
|
||||||
|
@ -155,3 +156,4 @@ export default DropTarget(
|
||||||
languageProfileItemDragSource,
|
languageProfileItemDragSource,
|
||||||
collectDragSource
|
collectDragSource
|
||||||
)(LanguageProfileItemDragSource));
|
)(LanguageProfileItemDragSource));
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
|
@ -34,5 +34,6 @@ class Profiles extends Component {
|
||||||
|
|
||||||
// Only a single DragDropContext can exist so it's done here to allow editing
|
// Only a single DragDropContext can exist so it's done here to allow editing
|
||||||
// quality profiles and reordering delay profiles to work.
|
// quality profiles and reordering delay profiles to work.
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DragDropContext(HTML5Backend)(Profiles);
|
export default DragDropContext(HTML5Backend)(Profiles);
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
|
@ -89,4 +89,6 @@ QualityProfileItemDragPreview.propTypes = {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DragLayer(collectDragLayer)(QualityProfileItemDragPreview);
|
export default DragLayer(collectDragLayer)(QualityProfileItemDragPreview);
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
|
@ -230,6 +230,7 @@ QualityProfileItemDragSource.propTypes = {
|
||||||
onQualityProfileItemDragEnd: PropTypes.func.isRequired
|
onQualityProfileItemDragEnd: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable new-cap */
|
||||||
export default DropTarget(
|
export default DropTarget(
|
||||||
QUALITY_PROFILE_ITEM,
|
QUALITY_PROFILE_ITEM,
|
||||||
qualityProfileItemDropTarget,
|
qualityProfileItemDropTarget,
|
||||||
|
@ -239,3 +240,5 @@ export default DropTarget(
|
||||||
qualityProfileItemDragSource,
|
qualityProfileItemDragSource,
|
||||||
collectDragSource
|
collectDragSource
|
||||||
)(QualityProfileItemDragSource));
|
)(QualityProfileItemDragSource));
|
||||||
|
/* eslint-enable new-cap */
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ function createToggleAlbumMonitoredHandler(section) {
|
||||||
} = payload;
|
} = payload;
|
||||||
|
|
||||||
const state = getSectionState(getState(), section, true);
|
const state = getSectionState(getState(), section, true);
|
||||||
|
|
||||||
updateAlbums(dispatch, section, state.items, [albumId], {
|
updateAlbums(dispatch, section, state.items, [albumId], {
|
||||||
isSaving: true
|
isSaving: true
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import getDisplayName from 'Helpers/getDisplayName';
|
import getDisplayName from 'Helpers/getDisplayName';
|
||||||
|
|
|
@ -54,7 +54,7 @@ function createMapStateToProps() {
|
||||||
|
|
||||||
const languages = _.map(languageProfilesSchema.languages, 'language');
|
const languages = _.map(languageProfilesSchema.languages, 'language');
|
||||||
const qualities = getQualities(qualityProfileSchema.items);
|
const qualities = getQualities(qualityProfileSchema.items);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
items,
|
items,
|
||||||
artistType: artist.artistType,
|
artistType: artist.artistType,
|
||||||
|
|
|
@ -2,7 +2,6 @@ import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import padNumber from 'Utilities/Number/padNumber';
|
import padNumber from 'Utilities/Number/padNumber';
|
||||||
import Label from 'Components/Label';
|
import Label from 'Components/Label';
|
||||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
|
||||||
import TableRow from 'Components/Table/TableRow';
|
import TableRow from 'Components/Table/TableRow';
|
||||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||||
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { update } from 'Store/Actions/baseActions';
|
import { update } from 'Store/Actions/baseActions';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint max-params: 0 */
|
||||||
import areAllSelected from './areAllSelected';
|
import areAllSelected from './areAllSelected';
|
||||||
import getToggledRange from './getToggledRange';
|
import getToggledRange from './getToggledRange';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ import React from 'react';
|
||||||
import episodeEntities from 'Album/episodeEntities';
|
import episodeEntities from 'Album/episodeEntities';
|
||||||
import EpisodeTitleLink from 'Album/EpisodeTitleLink';
|
import EpisodeTitleLink from 'Album/EpisodeTitleLink';
|
||||||
import EpisodeStatusConnector from 'Album/EpisodeStatusConnector';
|
import EpisodeStatusConnector from 'Album/EpisodeStatusConnector';
|
||||||
import SeasonEpisodeNumber from 'Album/SeasonEpisodeNumber';
|
|
||||||
import EpisodeSearchCellConnector from 'Album/EpisodeSearchCellConnector';
|
import EpisodeSearchCellConnector from 'Album/EpisodeSearchCellConnector';
|
||||||
import ArtistNameLink from 'Artist/ArtistNameLink';
|
import ArtistNameLink from 'Artist/ArtistNameLink';
|
||||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue