Compare commits

...

2 commits

Author SHA1 Message Date
Thomas Zarebczan
826b3782ee
Update search.js 2021-08-26 10:52:38 -04:00
Thomas Zarebczan
34df7d2859
Fix stream type for livestreams
Was picking up collections 

+ other tweaks
2021-08-24 20:51:08 -04:00
3 changed files with 9 additions and 2 deletions

View file

@ -72,6 +72,7 @@ type Props = {
liveLivestreamsFirst?: boolean,
livestreamMap?: { [string]: any },
hasSource?: boolean,
hasNoSource?: boolean,
limitClaimsPerChannel?: number,
releaseTime?: string,
showNoSourceClaims?: boolean,
@ -133,6 +134,7 @@ function ClaimListDiscover(props: Props) {
liveLivestreamsFirst,
livestreamMap,
hasSource,
hasNoSource,
isChannel = false,
showNoSourceClaims,
empty,
@ -244,7 +246,10 @@ function ClaimListDiscover(props: Props) {
: 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;
}
@ -628,7 +633,7 @@ function ClaimListDiscover(props: Props) {
liveLivestreamsFirst={liveLivestreamsFirst}
livestreamMap={livestreamMap}
searchOptions={options}
showNoSourceClaims={showNoSourceClaims}
showNoSourceClaims={hasNoSource || showNoSourceClaims}
empty={empty}
/>
{loading &&

View file

@ -203,6 +203,7 @@ function ClaimTilesDiscover(props: Props) {
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;
}

View file

@ -34,6 +34,7 @@ export function getLivestreamOnlyOptions(options: any) {
delete newOptions.has_source;
delete newOptions.stream_types;
newOptions.has_no_source = true;
newOptions.claim_type = ['stream'];
return newOptions;
}