mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Refactor Episode section naming to Album in UI
This commit is contained in:
parent
0e7a22dc95
commit
b1a016289c
66 changed files with 372 additions and 372 deletions
|
@ -119,7 +119,7 @@ class Queue extends Component {
|
|||
items,
|
||||
isAlbumsFetching,
|
||||
isAlbumsPopulated,
|
||||
episodesError,
|
||||
albumsError,
|
||||
columns,
|
||||
totalRecords,
|
||||
isGrabbing,
|
||||
|
@ -139,7 +139,7 @@ class Queue extends Component {
|
|||
|
||||
const isRefreshing = isFetching || isAlbumsFetching || isCheckForFinishedDownloadExecuting;
|
||||
const isAllPopulated = isPopulated && (isAlbumsPopulated || !items.length);
|
||||
const hasError = error || episodesError;
|
||||
const hasError = error || albumsError;
|
||||
const selectedCount = this.getSelectedIds().length;
|
||||
const disableSelectedActions = selectedCount === 0;
|
||||
|
||||
|
@ -250,7 +250,7 @@ Queue.propTypes = {
|
|||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
isAlbumsFetching: PropTypes.bool.isRequired,
|
||||
isAlbumsPopulated: PropTypes.bool.isRequired,
|
||||
episodesError: PropTypes.object,
|
||||
albumsError: PropTypes.object,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
totalRecords: PropTypes.number,
|
||||
isGrabbing: PropTypes.bool.isRequired,
|
||||
|
|
|
@ -9,22 +9,22 @@ import selectUniqueIds from 'Utilities/Object/selectUniqueIds';
|
|||
import createCommandsSelector from 'Store/Selectors/createCommandsSelector';
|
||||
import { executeCommand } from 'Store/Actions/commandActions';
|
||||
import * as queueActions from 'Store/Actions/queueActions';
|
||||
import { fetchEpisodes, clearEpisodes } from 'Store/Actions/episodeActions';
|
||||
import { fetchAlbums, clearAlbums } from 'Store/Actions/albumActions';
|
||||
import * as commandNames from 'Commands/commandNames';
|
||||
import Queue from './Queue';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.episodes,
|
||||
(state) => state.albums,
|
||||
(state) => state.queue.paged,
|
||||
createCommandsSelector(),
|
||||
(episodes, queue, commands) => {
|
||||
(albums, queue, commands) => {
|
||||
const isCheckForFinishedDownloadExecuting = _.some(commands, { name: commandNames.CHECK_FOR_FINISHED_DOWNLOAD });
|
||||
|
||||
return {
|
||||
isAlbumsFetching: episodes.isFetching,
|
||||
isAlbumsPopulated: episodes.isPopulated,
|
||||
episodesError: episodes.error,
|
||||
isAlbumsFetching: albums.isFetching,
|
||||
isAlbumsPopulated: albums.isPopulated,
|
||||
albumsError: albums.error,
|
||||
isCheckForFinishedDownloadExecuting,
|
||||
...queue
|
||||
};
|
||||
|
@ -34,8 +34,8 @@ function createMapStateToProps() {
|
|||
|
||||
const mapDispatchToProps = {
|
||||
...queueActions,
|
||||
fetchEpisodes,
|
||||
clearEpisodes,
|
||||
fetchAlbums,
|
||||
clearAlbums,
|
||||
executeCommand
|
||||
};
|
||||
|
||||
|
@ -53,9 +53,9 @@ class QueueConnector extends Component {
|
|||
if (hasDifferentItems(prevProps.items, this.props.items)) {
|
||||
const albumIds = selectUniqueIds(this.props.items, 'albumId');
|
||||
if (albumIds.length) {
|
||||
this.props.fetchEpisodes({ albumIds });
|
||||
this.props.fetchAlbums({ albumIds });
|
||||
} else {
|
||||
this.props.clearEpisodes();
|
||||
this.props.clearAlbums();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class QueueConnector extends Component {
|
|||
componentWillUnmount() {
|
||||
unregisterPagePopulator(this.repopulate);
|
||||
this.props.clearQueue();
|
||||
this.props.clearEpisodes();
|
||||
this.props.clearAlbums();
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -158,8 +158,8 @@ QueueConnector.propTypes = {
|
|||
clearQueue: PropTypes.func.isRequired,
|
||||
grabQueueItems: PropTypes.func.isRequired,
|
||||
removeQueueItems: PropTypes.func.isRequired,
|
||||
fetchEpisodes: PropTypes.func.isRequired,
|
||||
clearEpisodes: PropTypes.func.isRequired,
|
||||
fetchAlbums: PropTypes.func.isRequired,
|
||||
clearAlbums: PropTypes.func.isRequired,
|
||||
executeCommand: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ function QueueDetails(props) {
|
|||
return (
|
||||
<Icon
|
||||
name={icons.DOWNLOADING}
|
||||
title={`Episode is downloading - ${progress.toFixed(1)}% ${title}`}
|
||||
title={`Album is downloading - ${progress.toFixed(1)}% ${title}`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import TableRow from 'Components/Table/TableRow';
|
|||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||
import ProtocolLabel from 'Activity/Queue/ProtocolLabel';
|
||||
import EpisodeTitleLink from 'Album/EpisodeTitleLink';
|
||||
import AlbumTitleLink from 'Album/AlbumTitleLink';
|
||||
import EpisodeQuality from 'Album/EpisodeQuality';
|
||||
import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal';
|
||||
import ArtistNameLink from 'Artist/ArtistNameLink';
|
||||
|
@ -68,7 +68,7 @@ class QueueRow extends Component {
|
|||
statusMessages,
|
||||
errorMessage,
|
||||
artist,
|
||||
episode,
|
||||
album,
|
||||
quality,
|
||||
protocol,
|
||||
indexer,
|
||||
|
@ -152,14 +152,14 @@ class QueueRow extends Component {
|
|||
);
|
||||
}
|
||||
|
||||
if (name === 'episodeTitle') {
|
||||
if (name === 'albumTitle') {
|
||||
return (
|
||||
<TableRowCell key={name}>
|
||||
<EpisodeTitleLink
|
||||
albumId={episode.id}
|
||||
<AlbumTitleLink
|
||||
albumId={album.id}
|
||||
artistId={artist.id}
|
||||
trackFileId={episode.trackFileId}
|
||||
episodeTitle={episode.title}
|
||||
trackFileId={album.trackFileId}
|
||||
albumTitle={album.title}
|
||||
showOpenArtistButton={true}
|
||||
/>
|
||||
</TableRowCell>
|
||||
|
@ -300,7 +300,7 @@ QueueRow.propTypes = {
|
|||
statusMessages: PropTypes.arrayOf(PropTypes.object),
|
||||
errorMessage: PropTypes.string,
|
||||
artist: PropTypes.object.isRequired,
|
||||
episode: PropTypes.object.isRequired,
|
||||
album: PropTypes.object.isRequired,
|
||||
quality: PropTypes.object.isRequired,
|
||||
protocol: PropTypes.string.isRequired,
|
||||
indexer: PropTypes.string,
|
||||
|
|
|
@ -5,16 +5,16 @@ import { connect } from 'react-redux';
|
|||
import { createSelector } from 'reselect';
|
||||
import { grabQueueItem, removeQueueItem } from 'Store/Actions/queueActions';
|
||||
import createArtistSelector from 'Store/Selectors/createArtistSelector';
|
||||
import createEpisodeSelector from 'Store/Selectors/createEpisodeSelector';
|
||||
import createAlbumSelector from 'Store/Selectors/createAlbumSelector';
|
||||
import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
|
||||
import QueueRow from './QueueRow';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
createArtistSelector(),
|
||||
createEpisodeSelector(),
|
||||
createAlbumSelector(),
|
||||
createUISettingsSelector(),
|
||||
(artist, episode, uiSettings) => {
|
||||
(artist, album, uiSettings) => {
|
||||
const result = _.pick(uiSettings, [
|
||||
'showRelativeDates',
|
||||
'shortDateFormat',
|
||||
|
@ -22,7 +22,7 @@ function createMapStateToProps() {
|
|||
]);
|
||||
|
||||
result.artist = artist;
|
||||
result.episode = episode;
|
||||
result.album = album;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class QueueRowConnector extends Component {
|
|||
// Render
|
||||
|
||||
render() {
|
||||
if (!this.props.episode) {
|
||||
if (!this.props.album) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ class QueueRowConnector extends Component {
|
|||
|
||||
QueueRowConnector.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
episode: PropTypes.object,
|
||||
album: PropTypes.object,
|
||||
grabQueueItem: PropTypes.func.isRequired,
|
||||
removeQueueItem: PropTypes.func.isRequired
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue