diff --git a/frontend/src/Activity/History/HistoryRow.js b/frontend/src/Activity/History/HistoryRow.js index f87d05e93..2dd73be4c 100644 --- a/frontend/src/Activity/History/HistoryRow.js +++ b/frontend/src/Activity/History/HistoryRow.js @@ -112,7 +112,7 @@ class HistoryRow extends Component { return ( { + onAlbumMonitoredPress = (albumId, monitored) => { this.props.toggleEpisodeMonitored({ - episodeId, + albumId, monitored: !monitored }); } diff --git a/frontend/src/Artist/Details/AlbumRow.js b/frontend/src/Artist/Details/AlbumRow.js index b186f3e4c..eb82e197f 100644 --- a/frontend/src/Artist/Details/AlbumRow.js +++ b/frontend/src/Artist/Details/AlbumRow.js @@ -112,7 +112,7 @@ class AlbumRow extends Component { className={styles.title} > diff --git a/frontend/src/Calendar/Agenda/AgendaEvent.js b/frontend/src/Calendar/Agenda/AgendaEvent.js index 4f8e1e3ca..519d37284 100644 --- a/frontend/src/Calendar/Agenda/AgendaEvent.js +++ b/frontend/src/Calendar/Agenda/AgendaEvent.js @@ -119,7 +119,7 @@ class AgendaEvent extends Component { diff --git a/frontend/src/Calendar/Events/CalendarEvent.js b/frontend/src/Calendar/Events/CalendarEvent.js index 1f16ce3e0..10c3e76a2 100644 --- a/frontend/src/Calendar/Events/CalendarEvent.js +++ b/frontend/src/Calendar/Events/CalendarEvent.js @@ -112,7 +112,7 @@ class CalendarEvent extends Component { @@ -168,7 +168,7 @@ class EpisodeDetailsModalContent extends Component { } EpisodeDetailsModalContent.propTypes = { - episodeId: PropTypes.number.isRequired, + albumId: PropTypes.number.isRequired, episodeEntity: PropTypes.string.isRequired, artistId: PropTypes.number.isRequired, artistName: PropTypes.string.isRequired, diff --git a/frontend/src/Episode/EpisodeDetailsModalContentConnector.js b/frontend/src/Episode/EpisodeDetailsModalContentConnector.js index 96ff470e8..02d0c6752 100644 --- a/frontend/src/Episode/EpisodeDetailsModalContentConnector.js +++ b/frontend/src/Episode/EpisodeDetailsModalContentConnector.js @@ -15,7 +15,7 @@ function createMapStateToProps() { return createSelector( createEpisodeSelector(), createArtistSelector(), - (episode, series) => { + (album, series) => { const { artistName, nameSlug, @@ -28,7 +28,7 @@ function createMapStateToProps() { nameSlug, artistMonitored, seriesType, - ...episode + ...album }; } ); @@ -63,7 +63,7 @@ class EpisodeDetailsModalContentConnector extends Component { _populate() { const artistId = this.props.artistId; - const albumId = this.props.episodeId; + const albumId = this.props.albumId; this.props.fetchTracks({ artistId, albumId }); // this.props.fetchTrackFiles({ artistId, albumId }); } @@ -78,13 +78,13 @@ class EpisodeDetailsModalContentConnector extends Component { onMonitorAlbumPress = (monitored) => { const { - episodeId, + albumId, episodeEntity } = this.props; this.props.toggleEpisodeMonitored({ episodeEntity, - episodeId, + albumId, monitored }); } @@ -103,7 +103,7 @@ class EpisodeDetailsModalContentConnector extends Component { } EpisodeDetailsModalContentConnector.propTypes = { - episodeId: PropTypes.number.isRequired, + albumId: PropTypes.number.isRequired, episodeEntity: PropTypes.string.isRequired, artistId: PropTypes.number.isRequired, fetchTracks: PropTypes.func.isRequired, diff --git a/frontend/src/Episode/EpisodeSearchCell.js b/frontend/src/Episode/EpisodeSearchCell.js index de6b551c4..eebc9aebf 100644 --- a/frontend/src/Episode/EpisodeSearchCell.js +++ b/frontend/src/Episode/EpisodeSearchCell.js @@ -36,7 +36,7 @@ class EpisodeSearchCell extends Component { render() { const { - episodeId, + albumId, artistId, episodeTitle, isSearching, @@ -59,7 +59,7 @@ class EpisodeSearchCell extends Component { episodeId, + (state, { albumId }) => albumId, (state, { sceneSeasonNumber }) => sceneSeasonNumber, createArtistSelector(), createCommandsSelector(), - (episodeId, sceneSeasonNumber, series, commands) => { + (albumId, sceneSeasonNumber, series, commands) => { const isSearching = _.some(commands, (command) => { const episodeSearch = command.name === commandNames.EPISODE_SEARCH; @@ -21,7 +21,7 @@ function createMapStateToProps() { return false; } - return command.body.albumIds.indexOf(episodeId) > -1; + return command.body.albumIds.indexOf(albumId) > -1; }); return { @@ -38,7 +38,7 @@ function createMapDispatchToProps(dispatch, props) { onSearchPress(name, path) { dispatch(executeCommand({ name: commandNames.EPISODE_SEARCH, - albumIds: [props.episodeId] + albumIds: [props.albumId] })); } }; diff --git a/frontend/src/Episode/EpisodeStatusConnector.js b/frontend/src/Episode/EpisodeStatusConnector.js index c5883355f..f19513b8b 100644 --- a/frontend/src/Episode/EpisodeStatusConnector.js +++ b/frontend/src/Episode/EpisodeStatusConnector.js @@ -46,7 +46,7 @@ class EpisodeStatusConnector extends Component { } EpisodeStatusConnector.propTypes = { - episodeId: PropTypes.number.isRequired, + albumId: PropTypes.number.isRequired, trackFileId: PropTypes.number.isRequired }; diff --git a/frontend/src/Episode/Summary/EpisodeSummary.js b/frontend/src/Episode/Summary/EpisodeSummary.js index 6869ad889..b1d5452ec 100644 --- a/frontend/src/Episode/Summary/EpisodeSummary.js +++ b/frontend/src/Episode/Summary/EpisodeSummary.js @@ -88,8 +88,8 @@ class EpisodeSummary extends Component {
{ hasOverview ? - overview : - 'No album overview.' + overview : + 'No album overview.' }
diff --git a/frontend/src/Episode/Summary/EpisodeSummaryConnector.js b/frontend/src/Episode/Summary/EpisodeSummaryConnector.js index 8e0976968..090c0dba6 100644 --- a/frontend/src/Episode/Summary/EpisodeSummaryConnector.js +++ b/frontend/src/Episode/Summary/EpisodeSummaryConnector.js @@ -20,7 +20,7 @@ function createMapStateToProps() { return { network: episode.label, qualityProfileId: episode.profileId, - airDateUtc: episode.releaseDate, + releaseDate: episode.releaseDate, overview: episode.overview, items, columns: tracks.columns diff --git a/frontend/src/Episode/Summary/TrackDetailRow.js b/frontend/src/Episode/Summary/TrackDetailRow.js index ad5d9a5c4..9bfd4a82a 100644 --- a/frontend/src/Episode/Summary/TrackDetailRow.js +++ b/frontend/src/Episode/Summary/TrackDetailRow.js @@ -96,7 +96,7 @@ class TrackDetailRow extends Component { className={styles.status} >
diff --git a/frontend/src/Store/Actions/Creators/createBatchToggleEpisodeMonitoredHandler.js b/frontend/src/Store/Actions/Creators/createBatchToggleEpisodeMonitoredHandler.js index 1017d261d..9d09b41f4 100644 --- a/frontend/src/Store/Actions/Creators/createBatchToggleEpisodeMonitoredHandler.js +++ b/frontend/src/Store/Actions/Creators/createBatchToggleEpisodeMonitoredHandler.js @@ -5,32 +5,32 @@ function createBatchToggleEpisodeMonitoredHandler(section, getFromState) { return function(payload) { return function(dispatch, getState) { const { - episodeIds, + albumIds, monitored } = payload; const state = getFromState(getState()); - updateEpisodes(dispatch, section, state.items, episodeIds, { + updateEpisodes(dispatch, section, state.items, albumIds, { isSaving: true }); const promise = $.ajax({ url: '/episode/monitor', method: 'PUT', - data: JSON.stringify({ episodeIds, monitored }), + data: JSON.stringify({ albumIds, monitored }), dataType: 'json' }); promise.done(() => { - updateEpisodes(dispatch, section, state.items, episodeIds, { + updateEpisodes(dispatch, section, state.items, albumIds, { isSaving: false, monitored }); }); promise.fail(() => { - updateEpisodes(dispatch, section, state.items, episodeIds, { + updateEpisodes(dispatch, section, state.items, albumIds, { isSaving: false }); }); diff --git a/frontend/src/Store/Actions/Creators/createToggleEpisodeMonitoredHandler.js b/frontend/src/Store/Actions/Creators/createToggleEpisodeMonitoredHandler.js index 8480ed067..3ddee1430 100644 --- a/frontend/src/Store/Actions/Creators/createToggleEpisodeMonitoredHandler.js +++ b/frontend/src/Store/Actions/Creators/createToggleEpisodeMonitoredHandler.js @@ -5,32 +5,32 @@ function createToggleEpisodeMonitoredHandler(section, getFromState) { return function(payload) { return function(dispatch, getState) { const { - episodeId, + albumId, monitored } = payload; const state = getFromState(getState()); - updateEpisodes(dispatch, section, state.items, [episodeId], { + updateEpisodes(dispatch, section, state.items, [albumId], { isSaving: true }); const promise = $.ajax({ - url: `/episode/${episodeId}`, + url: `/episode/${albumId}`, method: 'PUT', data: JSON.stringify({ monitored }), dataType: 'json' }); promise.done(() => { - updateEpisodes(dispatch, section, state.items, [episodeId], { + updateEpisodes(dispatch, section, state.items, [albumId], { isSaving: false, monitored }); }); promise.fail(() => { - updateEpisodes(dispatch, section, state.items, [episodeId], { + updateEpisodes(dispatch, section, state.items, [albumId], { isSaving: false }); }); diff --git a/frontend/src/Store/Actions/episodeActionHandlers.js b/frontend/src/Store/Actions/episodeActionHandlers.js index 52a441321..8eeba704c 100644 --- a/frontend/src/Store/Actions/episodeActionHandlers.js +++ b/frontend/src/Store/Actions/episodeActionHandlers.js @@ -14,7 +14,7 @@ const episodeActionHandlers = { [types.TOGGLE_EPISODE_MONITORED]: function(payload) { return function(dispatch, getState) { const { - episodeId: id, + albumId: id, episodeEntity = episodeEntities.EPISODES, monitored } = payload; @@ -64,9 +64,9 @@ const episodeActionHandlers = { const episodeSection = _.last(episodeEntity.split('.')); dispatch(batchActions( - albumIds.map((episodeId) => { + albumIds.map((albumId) => { return updateItem({ - id: episodeId, + id: albumId, section: episodeSection, isSaving: true }); @@ -82,9 +82,9 @@ const episodeActionHandlers = { promise.done((data) => { dispatch(batchActions( - albumIds.map((episodeId) => { + albumIds.map((albumId) => { return updateItem({ - id: episodeId, + id: albumId, section: episodeSection, isSaving: false, monitored @@ -95,9 +95,9 @@ const episodeActionHandlers = { promise.fail((xhr) => { dispatch(batchActions( - albumIds.map((episodeId) => { + albumIds.map((albumId) => { return updateItem({ - id: episodeId, + id: albumId, section: episodeSection, isSaving: false }); diff --git a/frontend/src/Store/Selectors/createQueueItemSelector.js b/frontend/src/Store/Selectors/createQueueItemSelector.js index a844bd050..2e902d7de 100644 --- a/frontend/src/Store/Selectors/createQueueItemSelector.js +++ b/frontend/src/Store/Selectors/createQueueItemSelector.js @@ -3,15 +3,15 @@ import { createSelector } from 'reselect'; function createQueueItemSelector() { return createSelector( - (state, { episodeId }) => episodeId, + (state, { albumId }) => albumId, (state) => state.queue.details, - (episodeId, details) => { - if (!episodeId) { + (albumId, details) => { + if (!albumId) { return null; } return _.find(details.items, (item) => { - return item.album.id === episodeId; + return item.album.id === albumId; }); } ); diff --git a/frontend/src/Utilities/Episode/updateEpisodes.js b/frontend/src/Utilities/Episode/updateEpisodes.js index 91cc61cd9..d3ad6d74f 100644 --- a/frontend/src/Utilities/Episode/updateEpisodes.js +++ b/frontend/src/Utilities/Episode/updateEpisodes.js @@ -1,9 +1,9 @@ import _ from 'lodash'; import { update } from 'Store/Actions/baseActions'; -function updateEpisodes(dispatch, section, episodes, episodeIds, options) { +function updateEpisodes(dispatch, section, episodes, albumIds, options) { const data = _.reduce(episodes, (result, item) => { - if (episodeIds.indexOf(item.id) > -1) { + if (albumIds.indexOf(item.id) > -1) { result.push({ ...item, ...options diff --git a/frontend/src/Wanted/CutoffUnmet/CutoffUnmetConnector.js b/frontend/src/Wanted/CutoffUnmet/CutoffUnmetConnector.js index d5399833d..acbf8a1eb 100644 --- a/frontend/src/Wanted/CutoffUnmet/CutoffUnmetConnector.js +++ b/frontend/src/Wanted/CutoffUnmet/CutoffUnmetConnector.js @@ -121,7 +121,7 @@ class CutoffUnmetConnector extends Component { } = this.props; this.props.batchToggleCutoffUnmetEpisodes({ - episodeIds: selected, + albumIds: selected, monitored: filterKey !== 'monitored' || !filterValue }); } diff --git a/frontend/src/Wanted/CutoffUnmet/CutoffUnmetRow.js b/frontend/src/Wanted/CutoffUnmet/CutoffUnmetRow.js index 5ba10a119..5d5c68dc0 100644 --- a/frontend/src/Wanted/CutoffUnmet/CutoffUnmetRow.js +++ b/frontend/src/Wanted/CutoffUnmet/CutoffUnmetRow.js @@ -84,7 +84,7 @@ function CutoffUnmetRow(props) { return ( @@ -135,7 +135,7 @@ function CutoffUnmetRow(props) { return ( // @@ -121,7 +121,7 @@ function MissingRow(props) { return (