64cbd4ae8d
* Dont show countdown on Lists * Add Repeat icon * Add Shuffle icon * Add Replay Icon * Add Replay Option to autoplayCountdown * Add Loop Control for Lists * Add Shuffle control for Lists * Improve View List Link and Fetch action * Add Play Button to List page * Add Shuffle Play Option on List Page and Menus * Fix Modal Remove Collection I18n * CSS: Fix Large list titles * Fix List playback on Floating Player * Add Theater Mode to its own class and fix bar text display * Add Play Next VJS component * Add Play Next Button * Add Play Previous VJS Component * Add Play Previous Button * Add Autoplay Next Button * Add separate control for autoplay next in list * Bump redux * Update CHANGELOG.md
37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import CollectionContent from './view';
|
|
import {
|
|
makeSelectUrlsForCollectionId,
|
|
makeSelectNameForCollectionId,
|
|
makeSelectCollectionForId,
|
|
makeSelectClaimForUri,
|
|
makeSelectClaimIsMine,
|
|
} from 'lbry-redux';
|
|
import { selectPlayingUri, selectListLoop, selectListShuffle } from 'redux/selectors/content';
|
|
import { doToggleLoopList, doToggleShuffleList } from 'redux/actions/content';
|
|
|
|
const select = (state, props) => {
|
|
const playingUri = selectPlayingUri(state);
|
|
const playingUrl = playingUri && playingUri.uri;
|
|
const claim = makeSelectClaimForUri(playingUrl)(state);
|
|
const url = claim && claim.permanent_url;
|
|
const loopList = selectListLoop(state);
|
|
const loop = loopList && loopList.collectionId === props.id && loopList.loop;
|
|
const shuffleList = selectListShuffle(state);
|
|
const shuffle = shuffleList && shuffleList.collectionId === props.id && shuffleList.newUrls;
|
|
|
|
return {
|
|
url,
|
|
collection: makeSelectCollectionForId(props.id)(state),
|
|
collectionUrls: makeSelectUrlsForCollectionId(props.id)(state),
|
|
collectionName: makeSelectNameForCollectionId(props.id)(state),
|
|
isMine: makeSelectClaimIsMine(url)(state),
|
|
loop,
|
|
shuffle,
|
|
};
|
|
};
|
|
|
|
export default connect(select, {
|
|
doToggleLoopList,
|
|
doToggleShuffleList,
|
|
})(CollectionContent);
|