use new isLivestream (placeholder stream) selector

This commit is contained in:
zeppi 2021-03-25 19:52:28 -04:00 committed by jessopb
parent 7743f08a6a
commit f091da3c54
8 changed files with 17 additions and 17 deletions

View file

@ -142,7 +142,7 @@
"imagesloaded": "^4.1.4",
"json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#0944944335f0045065b1710863b97bd1b2cb81b5",
"lbry-redux": "lbryio/lbry-redux#c494c92505cd531048de20bc37dc4d192b6ace01",
"lbryinc": "lbryio/lbryinc#7faea40d87b78ec91b901c62f501499dc4737025",
"lint-staged": "^7.0.2",
"localforage": "^1.7.1",

View file

@ -46,7 +46,7 @@ type Props = {
headerLabel?: string | Node,
name?: string,
hideAdvancedFilter?: boolean,
claimType?: Array<string>,
claimType?: string | Array<string>,
defaultClaimType?: Array<string>,
streamType?: string | Array<string>,
defaultStreamType?: string | Array<string>,
@ -194,7 +194,7 @@ function ClaimListDiscover(props: Props) {
not_channel_ids: Array<string>,
order_by: Array<string>,
release_time?: string,
claim_type?: Array<string>,
claim_type?: string | Array<string>,
name?: string,
duration?: string,
reposted_claim_id?: string,
@ -222,7 +222,7 @@ function ClaimListDiscover(props: Props) {
: CS.ORDER_BY_TOP_VALUE, // Sort by top
};
if (!ENABLE_NO_SOURCE_CLAIMS) {
if (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === CS.CLAIM_STREAM)) {
options.has_source = true;
}

View file

@ -10,7 +10,7 @@ import {
makeSelectReflectingClaimForUri,
makeSelectClaimWasPurchased,
makeSelectStreamingUrlForUri,
makeSelectClaimHasSource,
makeSelectClaimIsStreamPlaceholder,
} from 'lbry-redux';
import { selectMutedChannels, makeSelectChannelIsMuted } from 'redux/selectors/blocked';
import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc';
@ -39,7 +39,7 @@ const select = (state, props) => ({
isSubscribed: props.uri && makeSelectIsSubscribed(props.uri, true)(state),
streamingUrl: props.uri && makeSelectStreamingUrlForUri(props.uri)(state),
wasPurchased: props.uri && makeSelectClaimWasPurchased(props.uri)(state),
isLivestream: !makeSelectClaimHasSource(props.uri)(state),
isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state),
});
const perform = (dispatch) => ({

View file

@ -5,7 +5,7 @@ import {
makeSelectClaimIsPending,
doClearPublish,
doPrepareEdit,
makeSelectClaimHasSource,
makeSelectClaimIsStreamPlaceholder,
} from 'lbry-redux';
import { push } from 'connected-react-router';
import ClaimPreviewSubtitle from './view';
@ -13,7 +13,7 @@ import ClaimPreviewSubtitle from './view';
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
pending: makeSelectClaimIsPending(props.uri)(state),
isLivestream: !makeSelectClaimHasSource(props.uri)(state),
isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state),
});
const perform = (dispatch) => ({

View file

@ -28,7 +28,7 @@ type Props = {
orderBy?: Array<string>,
releaseTime?: string,
languages?: Array<string>,
claimType?: Array<string>,
claimType?: string | Array<string>,
timestamp?: string,
feeAmount?: string,
limitClaimsPerChannel?: number,
@ -70,7 +70,7 @@ function ClaimTilesDiscover(props: Props) {
order_by: Array<string>,
languages?: Array<string>,
release_time?: string,
claim_type?: Array<string>,
claim_type?: string | Array<string>,
timestamp?: string,
fee_amount?: string,
limit_claims_per_channel?: number,
@ -91,7 +91,7 @@ function ClaimTilesDiscover(props: Props) {
order_by: orderBy || ['trending_group', 'trending_mixed'],
};
if (!ENABLE_NO_SOURCE_CLAIMS) {
if (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === 'stream')) {
options.has_source = true;
}

View file

@ -1,10 +1,10 @@
import { connect } from 'react-redux';
import { makeSelectMediaTypeForUri, makeSelectClaimHasSource } from 'lbry-redux';
import { makeSelectMediaTypeForUri, makeSelectClaimIsStreamPlaceholder } from 'lbry-redux';
import FileType from './view';
const select = (state, props) => ({
mediaType: makeSelectMediaTypeForUri(props.uri)(state),
isLivestream: !makeSelectClaimHasSource(props.uri)(state),
isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state),
});
export default connect(select)(FileType);

View file

@ -10,7 +10,7 @@ import {
normalizeURI,
makeSelectClaimIsMine,
makeSelectClaimIsPending,
makeSelectClaimHasSource,
makeSelectClaimIsStreamPlaceholder,
} from 'lbry-redux';
import { makeSelectChannelInSubscriptions } from 'redux/selectors/subscriptions';
import { selectBlackListedOutpoints } from 'lbryinc';
@ -61,7 +61,7 @@ const select = (state, props) => {
title: makeSelectTitleForUri(uri)(state),
claimIsMine: makeSelectClaimIsMine(uri)(state),
claimIsPending: makeSelectClaimIsPending(uri)(state),
isLivestream: !makeSelectClaimHasSource(uri)(state),
isLivestream: makeSelectClaimIsStreamPlaceholder(uri)(state),
};
};

View file

@ -6950,9 +6950,9 @@ lazy-val@^1.0.4:
yargs "^13.2.2"
zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#0944944335f0045065b1710863b97bd1b2cb81b5:
lbry-redux@lbryio/lbry-redux#c494c92505cd531048de20bc37dc4d192b6ace01:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/0944944335f0045065b1710863b97bd1b2cb81b5"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/c494c92505cd531048de20bc37dc4d192b6ace01"
dependencies:
proxy-polyfill "0.1.6"
reselect "^3.0.0"