2018-06-11 00:41:25 -06:00
|
|
|
import { connect } from 'react-redux';
|
2019-08-02 02:28:14 -04:00
|
|
|
import {
|
|
|
|
makeSelectClaimForUri,
|
|
|
|
makeSelectThumbnailForUri,
|
|
|
|
makeSelectContentTypeForUri,
|
|
|
|
makeSelectStreamingUrlForUri,
|
|
|
|
makeSelectMediaTypeForUri,
|
|
|
|
makeSelectDownloadPathForUri,
|
|
|
|
makeSelectFileNameForUri,
|
|
|
|
} from 'lbry-redux';
|
2019-09-05 20:26:03 -04:00
|
|
|
import { THEME, AUTOPLAY } from 'constants/settings';
|
2018-06-11 00:41:25 -06:00
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
2019-09-09 13:31:00 -04:00
|
|
|
import { makeSelectNextUnplayedRecommended } from 'redux/selectors/content';
|
2018-06-11 00:41:25 -06:00
|
|
|
import FileRender from './view';
|
|
|
|
|
2019-08-02 02:28:14 -04:00
|
|
|
const select = (state, props) => ({
|
2018-06-11 00:41:25 -06:00
|
|
|
currentTheme: makeSelectClientSetting(THEME)(state),
|
2019-08-02 02:28:14 -04:00
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
mediaType: makeSelectMediaTypeForUri(props.uri)(state),
|
|
|
|
thumbnail: makeSelectThumbnailForUri(props.uri)(state),
|
|
|
|
contentType: makeSelectContentTypeForUri(props.uri)(state),
|
|
|
|
downloadPath: makeSelectDownloadPathForUri(props.uri)(state),
|
|
|
|
fileName: makeSelectFileNameForUri(props.uri)(state),
|
|
|
|
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
|
2019-09-05 20:26:03 -04:00
|
|
|
autoplay: makeSelectClientSetting(AUTOPLAY)(state),
|
2019-09-09 13:31:00 -04:00
|
|
|
nextUnplayed: makeSelectNextUnplayedRecommended(props.uri)(state),
|
2018-06-11 00:41:25 -06:00
|
|
|
});
|
|
|
|
|
2018-10-14 15:58:35 -06:00
|
|
|
export default connect(select)(FileRender);
|