Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/commit/30a512c880c6323ec09e9f5e43a4223377d4ce48
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
55 additions and
4 deletions
@ -8,6 +8,7 @@ import selectUniqueIds from 'Utilities/Object/selectUniqueIds';
import withCurrentPage from 'Components/withCurrentPage' ;
import * as historyActions from 'Store/Actions/historyActions' ;
import { fetchEpisodes , clearEpisodes } from 'Store/Actions/episodeActions' ;
import { clearEpisodeFiles } from 'Store/Actions/episodeFileActions' ;
import History from './History' ;
function createMapStateToProps ( ) {
@ -28,7 +29,8 @@ function createMapStateToProps() {
const mapDispatchToProps = {
... historyActions ,
fetchEpisodes ,
clearEpisodes
clearEpisodes ,
clearEpisodeFiles
} ;
class HistoryConnector extends Component {
@ -68,6 +70,7 @@ class HistoryConnector extends Component {
unregisterPagePopulator ( this . repopulate ) ;
this . props . clearHistory ( ) ;
this . props . clearEpisodes ( ) ;
this . props . clearEpisodeFiles ( ) ;
}
//
@ -150,7 +153,8 @@ HistoryConnector.propTypes = {
setHistoryTableOption : PropTypes . func . isRequired ,
clearHistory : PropTypes . func . isRequired ,
fetchEpisodes : PropTypes . func . isRequired ,
clearEpisodes : PropTypes . func . isRequired
clearEpisodes : PropTypes . func . isRequired ,
clearEpisodeFiles : PropTypes . func . isRequired
} ;
export default withCurrentPage (
@ -1,6 +1,8 @@
import PropTypes from 'prop-types' ;
import React , { Component } from 'react' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import { deleteEpisodeFile } from 'Store/Actions/episodeFileActions' ;
import { fetchEpisodeFile, deleteEpisodeFile } from 'Store/Actions/episodeFileActions' ;
import createEpisodeSelector from 'Store/Selectors/createEpisodeSelector' ;
import createEpisodeFileSelector from 'Store/Selectors/createEpisodeFileSelector' ;
import createSeriesSelector from 'Store/Selectors/createSeriesSelector' ;
@ -52,8 +54,50 @@ function createMapDispatchToProps(dispatch, props) {
id : props . episodeFileId ,
episodeEntity : props . episodeEntity
} ) ) ;
} ,
dispatchFetchEpisodeFile ( ) {
dispatch ( fetchEpisodeFile ( {
id : props . episodeFileId
} ) ) ;
}
} ;
}
export default connect ( createMapStateToProps , createMapDispatchToProps ) ( EpisodeSummary ) ;
class EpisodeSummaryConnector extends Component {
//
// Lifecycle
componentDidMount ( ) {
const {
episodeFileId ,
path ,
dispatchFetchEpisodeFile
} = this . props ;
if ( episodeFileId && ! path ) {
dispatchFetchEpisodeFile ( { id : episodeFileId } ) ;
}
}
//
// Render
render ( ) {
const {
dispatchFetchEpisodeFile ,
... otherProps
} = this . props ;
return < EpisodeSummary { ... otherProps } / > ;
}
}
EpisodeSummaryConnector . propTypes = {
episodeFileId : PropTypes . number ,
path : PropTypes . string ,
dispatchFetchEpisodeFile : PropTypes . func . isRequired
} ;
export default connect ( createMapStateToProps , createMapDispatchToProps ) ( EpisodeSummaryConnector ) ;
@ -31,6 +31,7 @@ export const defaultState = {
//
// Actions Types
export const FETCH _EPISODE _FILE = 'episodeFiles/fetchEpisodeFile' ;
export const FETCH _EPISODE _FILES = 'episodeFiles/fetchEpisodeFiles' ;
export const DELETE _EPISODE _FILE = 'episodeFiles/deleteEpisodeFile' ;
export const DELETE _EPISODE _FILES = 'episodeFiles/deleteEpisodeFiles' ;
@ -40,6 +41,7 @@ export const CLEAR_EPISODE_FILES = 'episodeFiles/clearEpisodeFiles';
//
// Action Creators
export const fetchEpisodeFile = createThunk ( FETCH _EPISODE _FILE ) ;
export const fetchEpisodeFiles = createThunk ( FETCH _EPISODE _FILES ) ;
export const deleteEpisodeFile = createThunk ( DELETE _EPISODE _FILE ) ;
export const deleteEpisodeFiles = createThunk ( DELETE _EPISODE _FILES ) ;
@ -55,6 +57,7 @@ const deleteEpisodeFileHelper = createRemoveItemHandler(section, '/episodeFile')
// Action Handlers
export const actionHandlers = handleThunks ( {
[ FETCH _EPISODE _FILE ] : createFetchHandler ( section , '/episodeFile' ) ,
[ FETCH _EPISODE _FILES ] : createFetchHandler ( section , '/episodeFile' ) ,
[ DELETE _EPISODE _FILE ] : function ( getState , payload , dispatch ) {