Fix stream type for livestreams (#6967)
* Fix stream type for livestreams Was picking up collections + other tweaks * Update search.js
This commit is contained in:
parent
2510217935
commit
ee609c654f
3 changed files with 9 additions and 2 deletions
|
@ -72,6 +72,7 @@ type Props = {
|
||||||
liveLivestreamsFirst?: boolean,
|
liveLivestreamsFirst?: boolean,
|
||||||
livestreamMap?: { [string]: any },
|
livestreamMap?: { [string]: any },
|
||||||
hasSource?: boolean,
|
hasSource?: boolean,
|
||||||
|
hasNoSource?: boolean,
|
||||||
limitClaimsPerChannel?: number,
|
limitClaimsPerChannel?: number,
|
||||||
releaseTime?: string,
|
releaseTime?: string,
|
||||||
showNoSourceClaims?: boolean,
|
showNoSourceClaims?: boolean,
|
||||||
|
@ -133,6 +134,7 @@ function ClaimListDiscover(props: Props) {
|
||||||
liveLivestreamsFirst,
|
liveLivestreamsFirst,
|
||||||
livestreamMap,
|
livestreamMap,
|
||||||
hasSource,
|
hasSource,
|
||||||
|
hasNoSource,
|
||||||
isChannel = false,
|
isChannel = false,
|
||||||
showNoSourceClaims,
|
showNoSourceClaims,
|
||||||
empty,
|
empty,
|
||||||
|
@ -244,7 +246,10 @@ function ClaimListDiscover(props: Props) {
|
||||||
: CS.ORDER_BY_TOP_VALUE, // Sort by top
|
: CS.ORDER_BY_TOP_VALUE, // Sort by top
|
||||||
};
|
};
|
||||||
|
|
||||||
if (hasSource || (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === CS.CLAIM_STREAM))) {
|
if (ENABLE_NO_SOURCE_CLAIMS && hasNoSource) {
|
||||||
|
options.has_no_source = true;
|
||||||
|
options.claim_type = ['stream'];
|
||||||
|
} else if (hasSource || (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === 'stream'))) {
|
||||||
options.has_source = true;
|
options.has_source = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -628,7 +633,7 @@ function ClaimListDiscover(props: Props) {
|
||||||
liveLivestreamsFirst={liveLivestreamsFirst}
|
liveLivestreamsFirst={liveLivestreamsFirst}
|
||||||
livestreamMap={livestreamMap}
|
livestreamMap={livestreamMap}
|
||||||
searchOptions={options}
|
searchOptions={options}
|
||||||
showNoSourceClaims={showNoSourceClaims}
|
showNoSourceClaims={hasNoSource || showNoSourceClaims}
|
||||||
empty={empty}
|
empty={empty}
|
||||||
/>
|
/>
|
||||||
{loading &&
|
{loading &&
|
||||||
|
|
|
@ -203,6 +203,7 @@ function ClaimTilesDiscover(props: Props) {
|
||||||
|
|
||||||
if (ENABLE_NO_SOURCE_CLAIMS && hasNoSource) {
|
if (ENABLE_NO_SOURCE_CLAIMS && hasNoSource) {
|
||||||
options.has_no_source = true;
|
options.has_no_source = true;
|
||||||
|
options.claim_type = ['stream'];
|
||||||
} else if (hasSource || (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === 'stream'))) {
|
} else if (hasSource || (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === 'stream'))) {
|
||||||
options.has_source = true;
|
options.has_source = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ export function getLivestreamOnlyOptions(options: any) {
|
||||||
delete newOptions.has_source;
|
delete newOptions.has_source;
|
||||||
delete newOptions.stream_types;
|
delete newOptions.stream_types;
|
||||||
newOptions.has_no_source = true;
|
newOptions.has_no_source = true;
|
||||||
|
newOptions.claim_type = ['stream'];
|
||||||
return newOptions;
|
return newOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue