fix selector for resolved related content #281
3 changed files with 26 additions and 30 deletions
8
dist/bundle.es.js
vendored
8
dist/bundle.es.js
vendored
|
@ -1120,6 +1120,7 @@ const getSearchQueryString = (query, options = {}) => {
|
|||
|
||||
if (includeUserOptions) {
|
||||
const claimType = options[SEARCH_OPTIONS.CLAIM_TYPE];
|
||||
if (claimType) {
|
||||
queryParams.push(`claimType=${claimType}`);
|
||||
|
||||
// If they are only searching for channels, strip out the media info
|
||||
|
@ -1127,6 +1128,7 @@ const getSearchQueryString = (query, options = {}) => {
|
|||
queryParams.push(`mediaType=${[SEARCH_OPTIONS.MEDIA_FILE, SEARCH_OPTIONS.MEDIA_AUDIO, SEARCH_OPTIONS.MEDIA_VIDEO, SEARCH_OPTIONS.MEDIA_TEXT, SEARCH_OPTIONS.MEDIA_IMAGE, SEARCH_OPTIONS.MEDIA_APPLICATION].reduce((acc, currentOption) => options[currentOption] ? `${acc}${currentOption},` : acc, '')}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const additionalOptions = {};
|
||||
const { related_to } = options;
|
||||
|
@ -2395,13 +2397,9 @@ const makeSelectResolvedRecommendedContentForUri = (uri, size) => reselect.creat
|
|||
return;
|
||||
}
|
||||
|
||||
const options = { related_to: claim.claim_id, isBackgroundSearch: true };
|
||||
if (!isMature) {
|
||||
options['nsfw'] = false;
|
||||
}
|
||||
const options = { related_to: claim.claim_id, size, isBackgroundSearch: false };
|
||||
|
||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), options);
|
||||
|
||||
let results = resolvedResultsByQuery[searchQuery];
|
||||
if (results) {
|
||||
results = results.filter(result => buildURI({ streamClaimId: result.claimId, streamName: result.name }) !== currentUri);
|
||||
|
|
|
@ -701,13 +701,9 @@ export const makeSelectResolvedRecommendedContentForUri = (uri: string, size: nu
|
|||
related_to?: string,
|
||||
nsfw?: boolean,
|
||||
isBackgroundSearch?: boolean,
|
||||
} = { related_to: claim.claim_id, isBackgroundSearch: true };
|
||||
if (!isMature) {
|
||||
options['nsfw'] = false;
|
||||
}
|
||||
} = { related_to: claim.claim_id, size, isBackgroundSearch: false };
|
||||
|
||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), options);
|
||||
|
||||
let results = resolvedResultsByQuery[searchQuery];
|
||||
if (results) {
|
||||
results = results.filter(
|
||||
|
|
|
@ -48,6 +48,7 @@ export const getSearchQueryString = (
|
|||
|
||||
if (includeUserOptions) {
|
||||
const claimType = options[SEARCH_OPTIONS.CLAIM_TYPE];
|
||||
if (claimType) {
|
||||
queryParams.push(`claimType=${claimType}`);
|
||||
|
||||
// If they are only searching for channels, strip out the media info
|
||||
|
@ -67,6 +68,7 @@ export const getSearchQueryString = (
|
|||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const additionalOptions = {}
|
||||
const { related_to } = options;
|
||||
|
|
Loading…
Reference in a new issue