use new isLivestream (placeholder stream) selector
This commit is contained in:
parent
7743f08a6a
commit
f091da3c54
8 changed files with 17 additions and 17 deletions
|
@ -142,7 +142,7 @@
|
||||||
"imagesloaded": "^4.1.4",
|
"imagesloaded": "^4.1.4",
|
||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
"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",
|
"lbryinc": "lbryio/lbryinc#7faea40d87b78ec91b901c62f501499dc4737025",
|
||||||
"lint-staged": "^7.0.2",
|
"lint-staged": "^7.0.2",
|
||||||
"localforage": "^1.7.1",
|
"localforage": "^1.7.1",
|
||||||
|
|
|
@ -46,7 +46,7 @@ type Props = {
|
||||||
headerLabel?: string | Node,
|
headerLabel?: string | Node,
|
||||||
name?: string,
|
name?: string,
|
||||||
hideAdvancedFilter?: boolean,
|
hideAdvancedFilter?: boolean,
|
||||||
claimType?: Array<string>,
|
claimType?: string | Array<string>,
|
||||||
defaultClaimType?: Array<string>,
|
defaultClaimType?: Array<string>,
|
||||||
streamType?: string | Array<string>,
|
streamType?: string | Array<string>,
|
||||||
defaultStreamType?: string | Array<string>,
|
defaultStreamType?: string | Array<string>,
|
||||||
|
@ -194,7 +194,7 @@ function ClaimListDiscover(props: Props) {
|
||||||
not_channel_ids: Array<string>,
|
not_channel_ids: Array<string>,
|
||||||
order_by: Array<string>,
|
order_by: Array<string>,
|
||||||
release_time?: string,
|
release_time?: string,
|
||||||
claim_type?: Array<string>,
|
claim_type?: string | Array<string>,
|
||||||
name?: string,
|
name?: string,
|
||||||
duration?: string,
|
duration?: string,
|
||||||
reposted_claim_id?: string,
|
reposted_claim_id?: string,
|
||||||
|
@ -222,7 +222,7 @@ function ClaimListDiscover(props: Props) {
|
||||||
: CS.ORDER_BY_TOP_VALUE, // Sort by top
|
: 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;
|
options.has_source = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
makeSelectReflectingClaimForUri,
|
makeSelectReflectingClaimForUri,
|
||||||
makeSelectClaimWasPurchased,
|
makeSelectClaimWasPurchased,
|
||||||
makeSelectStreamingUrlForUri,
|
makeSelectStreamingUrlForUri,
|
||||||
makeSelectClaimHasSource,
|
makeSelectClaimIsStreamPlaceholder,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import { selectMutedChannels, makeSelectChannelIsMuted } from 'redux/selectors/blocked';
|
import { selectMutedChannels, makeSelectChannelIsMuted } from 'redux/selectors/blocked';
|
||||||
import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc';
|
import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc';
|
||||||
|
@ -39,7 +39,7 @@ const select = (state, props) => ({
|
||||||
isSubscribed: props.uri && makeSelectIsSubscribed(props.uri, true)(state),
|
isSubscribed: props.uri && makeSelectIsSubscribed(props.uri, true)(state),
|
||||||
streamingUrl: props.uri && makeSelectStreamingUrlForUri(props.uri)(state),
|
streamingUrl: props.uri && makeSelectStreamingUrlForUri(props.uri)(state),
|
||||||
wasPurchased: props.uri && makeSelectClaimWasPurchased(props.uri)(state),
|
wasPurchased: props.uri && makeSelectClaimWasPurchased(props.uri)(state),
|
||||||
isLivestream: !makeSelectClaimHasSource(props.uri)(state),
|
isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = (dispatch) => ({
|
const perform = (dispatch) => ({
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {
|
||||||
makeSelectClaimIsPending,
|
makeSelectClaimIsPending,
|
||||||
doClearPublish,
|
doClearPublish,
|
||||||
doPrepareEdit,
|
doPrepareEdit,
|
||||||
makeSelectClaimHasSource,
|
makeSelectClaimIsStreamPlaceholder,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import { push } from 'connected-react-router';
|
import { push } from 'connected-react-router';
|
||||||
import ClaimPreviewSubtitle from './view';
|
import ClaimPreviewSubtitle from './view';
|
||||||
|
@ -13,7 +13,7 @@ import ClaimPreviewSubtitle from './view';
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
claim: makeSelectClaimForUri(props.uri)(state),
|
claim: makeSelectClaimForUri(props.uri)(state),
|
||||||
pending: makeSelectClaimIsPending(props.uri)(state),
|
pending: makeSelectClaimIsPending(props.uri)(state),
|
||||||
isLivestream: !makeSelectClaimHasSource(props.uri)(state),
|
isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = (dispatch) => ({
|
const perform = (dispatch) => ({
|
||||||
|
|
|
@ -28,7 +28,7 @@ type Props = {
|
||||||
orderBy?: Array<string>,
|
orderBy?: Array<string>,
|
||||||
releaseTime?: string,
|
releaseTime?: string,
|
||||||
languages?: Array<string>,
|
languages?: Array<string>,
|
||||||
claimType?: Array<string>,
|
claimType?: string | Array<string>,
|
||||||
timestamp?: string,
|
timestamp?: string,
|
||||||
feeAmount?: string,
|
feeAmount?: string,
|
||||||
limitClaimsPerChannel?: number,
|
limitClaimsPerChannel?: number,
|
||||||
|
@ -70,7 +70,7 @@ function ClaimTilesDiscover(props: Props) {
|
||||||
order_by: Array<string>,
|
order_by: Array<string>,
|
||||||
languages?: Array<string>,
|
languages?: Array<string>,
|
||||||
release_time?: string,
|
release_time?: string,
|
||||||
claim_type?: Array<string>,
|
claim_type?: string | Array<string>,
|
||||||
timestamp?: string,
|
timestamp?: string,
|
||||||
fee_amount?: string,
|
fee_amount?: string,
|
||||||
limit_claims_per_channel?: number,
|
limit_claims_per_channel?: number,
|
||||||
|
@ -91,7 +91,7 @@ function ClaimTilesDiscover(props: Props) {
|
||||||
order_by: orderBy || ['trending_group', 'trending_mixed'],
|
order_by: orderBy || ['trending_group', 'trending_mixed'],
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!ENABLE_NO_SOURCE_CLAIMS) {
|
if (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === 'stream')) {
|
||||||
options.has_source = true;
|
options.has_source = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { makeSelectMediaTypeForUri, makeSelectClaimHasSource } from 'lbry-redux';
|
import { makeSelectMediaTypeForUri, makeSelectClaimIsStreamPlaceholder } from 'lbry-redux';
|
||||||
import FileType from './view';
|
import FileType from './view';
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
mediaType: makeSelectMediaTypeForUri(props.uri)(state),
|
mediaType: makeSelectMediaTypeForUri(props.uri)(state),
|
||||||
isLivestream: !makeSelectClaimHasSource(props.uri)(state),
|
isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(select)(FileType);
|
export default connect(select)(FileType);
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
normalizeURI,
|
normalizeURI,
|
||||||
makeSelectClaimIsMine,
|
makeSelectClaimIsMine,
|
||||||
makeSelectClaimIsPending,
|
makeSelectClaimIsPending,
|
||||||
makeSelectClaimHasSource,
|
makeSelectClaimIsStreamPlaceholder,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import { makeSelectChannelInSubscriptions } from 'redux/selectors/subscriptions';
|
import { makeSelectChannelInSubscriptions } from 'redux/selectors/subscriptions';
|
||||||
import { selectBlackListedOutpoints } from 'lbryinc';
|
import { selectBlackListedOutpoints } from 'lbryinc';
|
||||||
|
@ -61,7 +61,7 @@ const select = (state, props) => {
|
||||||
title: makeSelectTitleForUri(uri)(state),
|
title: makeSelectTitleForUri(uri)(state),
|
||||||
claimIsMine: makeSelectClaimIsMine(uri)(state),
|
claimIsMine: makeSelectClaimIsMine(uri)(state),
|
||||||
claimIsPending: makeSelectClaimIsPending(uri)(state),
|
claimIsPending: makeSelectClaimIsPending(uri)(state),
|
||||||
isLivestream: !makeSelectClaimHasSource(uri)(state),
|
isLivestream: makeSelectClaimIsStreamPlaceholder(uri)(state),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6950,9 +6950,9 @@ lazy-val@^1.0.4:
|
||||||
yargs "^13.2.2"
|
yargs "^13.2.2"
|
||||||
zstd-codec "^0.1.1"
|
zstd-codec "^0.1.1"
|
||||||
|
|
||||||
lbry-redux@lbryio/lbry-redux#0944944335f0045065b1710863b97bd1b2cb81b5:
|
lbry-redux@lbryio/lbry-redux#c494c92505cd531048de20bc37dc4d192b6ace01:
|
||||||
version "0.0.1"
|
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:
|
dependencies:
|
||||||
proxy-polyfill "0.1.6"
|
proxy-polyfill "0.1.6"
|
||||||
reselect "^3.0.0"
|
reselect "^3.0.0"
|
||||||
|
|
Loading…
Reference in a new issue