diff --git a/dist/bundle.es.js b/dist/bundle.es.js index dd4378a..5602bc7 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -870,7 +870,7 @@ const DEFAULT_FOLLOWED_TAGS = ['art', 'automotive', 'blockchain', 'comedy', 'eco const MATURE_TAGS = ['porn', 'nsfw', 'mature', 'xxx']; -const DEFAULT_KNOWN_TAGS = ['free speech', 'censorship', 'gaming', 'pop culture', 'entertainment', 'technology', 'music', 'funny', 'education', 'learning', 'news', 'gameplay', 'nature', 'beliefs', 'comedy', 'games', 'film & animation', 'game', 'weapons', 'blockchain', 'video game', 'sports', 'walkthrough', 'art', 'pc', 'minecraft', 'playthrough', 'economics', 'automotive', 'play', 'tutorial', 'twitch', 'how to', 'ps4', 'bitcoin', 'fortnite', 'commentary', 'lets play', 'fun', 'politics', 'travel', 'food', 'science', 'xbox', 'liberal', 'democrat', 'progressive', 'survival', 'non-profits', 'activism', 'cryptocurrency', 'playstation', 'nintendo', 'government', 'steam', 'podcast', 'gamer', 'horror', 'conservative', 'reaction', 'trailer', 'love', 'cnn', 'republican', 'political', 'hangoutsonair', 'hoa', 'msnbc', 'cbs', 'anime', 'donald trump', 'fiction', 'fox news', 'crypto', 'ethereum', 'call of duty', 'android', 'multiplayer', 'epic', 'rpg', 'adventure', 'secular talk', 'btc', 'atheist', 'atheism', 'video games', 'ps3', 'cod', 'online', 'agnostic', 'movie', 'fps', 'lets', 'mod', 'world', 'reviews', 'sharefactory', 'space', 'pokemon', 'stream', 'hilarious', 'lol', 'sony', 'god', 'dance', 'pvp', 'tech', 'strategy', 'zombies', 'fail', 'film', 'xbox360', 'animation', 'unboxing', 'money', 'wwe', 'mods', 'indie', 'pubg', 'ios', 'history', 'rap', 'mobile', 'trump', 'hack', 'flat earth', 'trap', 'humor', 'vlogging', 'fox', 'news radio', 'facebook', 'edm', 'fitness', 'vaping', 'hip hop', 'secular', 'jesus', 'song', 'vape', 'guitar', 'remix', 'mining', 'daily', 'diy', 'pets', 'videogame', 'death', 'funny moments', 'religion', 'media', 'viral', 'war', 'nbc', 'freedom', 'gold', 'family', 'meme', 'zombie', 'photography', 'chill', 'sniper', 'computer', 'iphone', 'dragon', 'bible', 'pro', 'overwatch', 'litecoin', 'gta', 'house', 'fire', 'bass', 'truth', 'crash', 'mario', 'league of legends', 'wii', 'mmorpg', 'health', 'marvel', 'racing', 'apple', 'instrumental', 'earth', 'destiny', 'satire', 'race', 'training', 'electronic', 'boss', 'roblox', 'family friendly', 'california', 'react', 'christian', 'mmo', 'twitter', 'help', 'star', 'cars', 'random', 'top 10', 'ninja', 'guns', 'linux', 'lessons', 'vegan', 'future', 'dota 2', 'studio', 'star wars', 'shooting', 'nasa', 'rock', 'league', 'subscribe', 'water', 'gta v', 'car', 'samsung', 'music video', 'skyrim', 'dog', 'comics', 'shooter game', 'bo3', 'halloween', 'liberty', 'eth', 'conspiracy', 'knife', 'fashion', 'stories', 'vapor', 'nvidia', 'cute', 'beat', 'nintendo switch', 'fantasy', 'christmas', 'world of warcraft', 'industry', 'cartoon', 'garden', 'animals', 'windows', 'happy', 'magic', 'memes', 'design', 'tactical', 'fallout 4', 'puzzle', 'parody', 'rv', 'beats', 'building', 'disney', 'drone', 'ps2', 'beach', 'metal', 'christianity', 'business', 'mix', 'bo2', 'cover', 'senate', '4k', 'united states', 'final', 'hero', 'playing', 'dlc', 'ubisoft', 'halo', 'pc gaming', 'raw', 'investing', 'online learning', 'software', 'ark', 'mojang', 'console', 'battle royale', 'canon', 'microsoft', 'camping', 'ufo', 'progressive talk', 'switch', 'fpv', 'arcade', 'school', 'driving', 'bodybuilding', 'drama', 'retro', 'science fiction', 'eggs', 'australia', 'modded', 'rainbow', 'gamers', 'resident evil', 'drawing', 'brasil', 'england', 'hillary clinton', 'singing', 'final fantasy', 'hiphop', 'video blog', 'mature', 'quad', 'noob', 'simulation', 'illuminati', 'poetry', 'dayz', 'manga', 'howto', 'insane', 'press', 'special', 'church', 'ico', 'weird', 'libertarian', 'crafting', 'level', 'comic', 'sandbox', 'daily vlog', 'outdoor', 'black ops', 'sound', 'christ', 'duty', 'juvenile fiction', 'pc game', 'how-to', 'ww2', 'creepy', 'artist', 'galaxy', 'destiny 2', 'new music', 'quest', 'lee', 'pacman', 'super smash bros', 'day', 'survival horror', 'patreon', 'bitcoin price', 'trending', 'open world', 'wii u', 'dope', 'reaper', 'sniping', 'dubstep', 'truck', 'planet', 'dc', 'amazon', 'spirituality', 'universe', 'video game culture', 'community', 'cat', 'aliens', 'tourism', 'altcoins', 'style', 'travel trailer', 'rda', 'gun', 'secret', 'far cry 5', 'auto', 'culture', 'dj', 'mw2', 'lord', 'full time rving', 'role-playing game', 'prank', 'grand theft auto', 'master', 'wrestling', 'sci-fi', 'workout', 'ghost', 'fake news', 'silly', 'season', 'bo4', 'trading', 'extreme', 'economy', 'combat', 'plays', 'muslim', 'pubg mobile', 'clips', 'bo1', 'paypal', 'sims', 'exploration', 'light', 'ripple', 'paranormal', 'football', 'capcom', 'rta', 'discord', 'batman', 'player', 'server', 'anarchy', 'military', 'playlist', 'cosplay', 'rv park', 'rant', 'edit', 'germany', 'reading', 'chris', 'flash', 'loot', 'bitcoin gratis', 'game reviews', 'movies', 'stupid', 'latest news', 'squad gameplay', 'guru', 'timelapse', 'black ops 3', 'holiday', 'soul', 'motivation', 'mw3', 'vacation', 'sega', '19th century', 'pop', 'sims 4', 'post', 'smok', 'island', 'scotland', 'paladins', 'warrior', 'creepypasta', 'role-playing', 'solar', 'vr', 'animal', 'peace', 'consciousness', 'dota', 'audio', 'mass effect', 'humour', 'first look', 'videogames', 'future bass', 'freestyle', 'hardcore', 'portugal', 'dantdm', 'teaser', 'lbry']; +const DEFAULT_KNOWN_TAGS = ['free speech', 'censorship', 'gaming', 'pop culture', 'Entertainment', 'technology', 'music', 'funny', 'Education', 'learning', 'news', 'gameplay', 'nature', 'beliefs', 'comedy', 'games', 'sony interactive entertainment', 'film & animation', 'game', 'weapons', "let's play", 'blockchain', 'video game', 'sports', 'walkthrough', 'ps4live', 'art', 'pc', 'minecraft', 'playthrough', 'economics', 'automotive', 'play', 'ps4share', 'tutorial', 'twitch', 'how to', 'ps4', 'bitcoin', 'fortnite', 'commentary', 'lets play', 'fun', 'politics', 'xbox', 'autos & vehicles', 'Travel & Events', 'food', 'science', 'xbox one', 'liberal', 'democrat', 'progressive', 'survival', 'Nonprofits & Activism', 'cryptocurrency', 'playstation', 'nintendo', 'government', 'steam', 'podcast', 'gamer', 'horror', 'conservative', 'reaction', 'trailer', 'love', 'cnn', 'republican', 'political', 'hangoutsonair', 'hoa', 'msnbc', 'cbs', 'anime', 'donald trump', 'fiction', 'fox news', 'crypto', 'ethereum', 'call of duty', 'android', 'multiplayer', 'epic', 'rpg', 'adventure', 'secular talk', 'btc', 'atheist', 'atheism', 'video games', 'ps3', 'cod', 'online', 'agnostic', 'movie', 'fps', 'lets', 'mod', 'world', 'reviews', 'sharefactory', 'space', 'pokemon', 'stream', 'hilarious', 'lol', 'sony', 'god', "let's", 'dance', 'pvp', 'tech', 'strategy', 'zombies', 'fail', 'film', 'xbox 360', 'animation', 'unboxing', 'money', 'how', 'travel', 'wwe', 'mods', 'indie', 'pubg', 'ios', 'history', 'rap', 'sony computer entertainment', 'mobile', 'trump', 'hack', 'flat earth', 'trap', 'humor', 'vlogging', 'fox', 'news radio', 'facebook', 'edm', 'fitness', 'vaping', 'hip hop', 'secular', 'jesus', 'song', 'vape', 'guitar', 'remix', 'mining', 'daily', 'diy', 'pets & animals', 'videogame', 'death', 'funny moments', 'religion', 'media', 'viral', 'war', 'nbc', 'freedom', 'gold', 'family', 'meme', 'zombie', 'photography', 'chill', 'sniper', 'computer', 'iphone', 'dragon', 'bible', 'pro', 'overwatch', 'litecoin', 'gta', 'house', 'fire', 'bass', 'bitcoin news', 'truth', 'crash', 'mario', 'league of legends', 'wii', 'mmorpg', 'grand theft auto v', 'health', 'marvel', 'racing', 'apple', 'instrumental', 'earth', 'destiny', 'satire', 'race', 'training', 'electronic', 'boss', 'roblox', 'family friendly', 'california', 'react', 'christian', 'mmo', 'twitter', 'help', 'star', 'cars', 'random', 'top 10', 'ninja', 'guns', 'linux', 'lessons', 'vegan', 'future', 'dota 2', 'studio', 'star wars', 'gta 5', 'shooting', 'nasa', 'rock', 'league', 'subscribe', 'water', 'gta v', 'car', 'samsung', 'music video', 'skyrim', 'dog', 'comics', 'shooter game', 'bo3', 'halloween', 'liberty', 'eth', 'conspiracy', 'knife', 'fashion', 'stories', 'vapor', 'nvidia', 'cute', 'beat', 'nintendo switch', 'fantasy', 'christmas', 'world of warcraft', 'industry', 'cartoon', 'crypto news', 'garden', 'animals', 'windows', 'happy', 'magic', 'memes', 'design', 'tactical', 'fallout 4', 'puzzle', 'parody', 'rv', 'beats', 'fortnite battle royale', 'building', 'disney', 'drone', 'ps2', 'beach', 'metal', 'christianity', 'business', 'mix', 'bo2', 'cover', 'senate', '4k', 'united states', 'final', 'hero', 'playing', 'dlc', 'ubisoft', 'halo', 'pc gaming', 'raw', 'investing', 'online learning', 'software', 'ark', 'mojang', 'console', 'battle royale', 'canon', 'microsoft', 'camping', 'cryptocurrency news', 'ufo', 'progressive talk', 'switch', 'fpv', 'arcade', 'school', 'driving', 'bodybuilding', 'drama', 'retro', 'science fiction', 'eggs', 'australia', 'modded', 'rainbow', 'gamers', 'resident evil', 'drawing', 'brasil', 'england', 'hillary clinton', 'singing', 'final fantasy', 'hiphop', 'video blog', 'mature', 'quad', 'noob', 'simulation', 'illuminati', 'poetry', 'dayz', 'manga', 'howto', 'insane', 'xbox360', 'press', 'special', 'church', 'ico', 'weird', 'libertarian', 'crafting', 'level', 'comic', 'sandbox', 'daily vlog', 'outdoor', 'black ops', 'sound', 'christ', 'duty', 'Juvenile fiction', 'pc game', 'how-to', 'ww2', 'creepy', 'artist', 'galaxy', 'destiny 2', 'new music', 'quest', 'lee', 'pacman', 'super smash bros', 'day', 'survival horror', 'patreon', 'bitcoin price', 'trending', 'open world', 'wii u', 'dope', 'reaper', 'sniping', 'dubstep', 'truck', 'planet', 'dc', 'amazon', 'spirituality', 'universe', 'video game culture', 'community', 'cat', 'aliens', 'tourism', 'altcoins', 'style', 'travel trailer', 'rda', '5859dfec-026f-46ba-bea0-02bf43aa1a6f', 'gun', 'secret', 'far cry 5', 'auto', 'culture', 'dj', 'mw2', 'lord', 'full time rving', 'role-playing game', 'prank', 'grand theft auto', 'master', 'wrestling', 'sci-fi', 'workout', 'ghost', 'fake news', 'silly', 'season', 'bo4', 'trading', 'extreme', 'economy', 'combat', 'plays', 'muslim', 'pubg mobile', 'clips', 'bo1', 'paypal', 'sims', 'exploration', 'light', 'ripple', 'paranormal', 'football', 'capcom', 'rta', 'discord', 'action role-playing game', 'playthrough part', 'batman', 'player', 'server', 'anarchy', 'military', 'playlist', 'cosplay', 'rv park', 'rant', 'edit', 'germany', 'reading', 'chris', 'flash', 'loot', 'bitcoin gratis', 'game reviews', 'movies', 'stupid', 'latest news', 'squad gameplay', 'guru', 'timelapse', 'black ops 3', 'holiday', 'soul', 'motivation', 'mw3', 'vacation', 'sega', '19th century', 'pop', 'sims 4', 'post', 'smok', 'island', 'scotland', 'paladins', 'warrior', 'creepypasta', 'role-playing video game', 'solar', 'vr', 'animal', 'peace', 'consciousness', 'dota', 'audio', 'mass effect', 'Humour', 'first look', 'videogames', 'future bass', 'freestyle', 'hardcore', 'portugal', 'dantdm', 'teaser', 'lbry']; // @@ -1052,7 +1052,7 @@ function apiCall(method, params, resolve, reject) { }) }; - return fetch(Lbry.daemonConnectionString + '?m=' + method, options).then(checkAndParse).then(response => { + return fetch(Lbry.daemonConnectionString, options).then(checkAndParse).then(response => { const error = response.error || response.result && response.result.error; if (error) { @@ -2406,28 +2406,33 @@ const makeSelectMyStreamUrlsForPage = (page = 1) => reselect.createSelector(sele const selectMyStreamUrlsCount = reselect.createSelector(selectMyClaimUrisWithoutChannels, channels => channels.length); -const makeSelectResolvedRecommendedContentForUri = (uri, size) => reselect.createSelector(makeSelectClaimForUri(uri), selectResolvedSearchResultsByQuery, makeSelectClaimIsNsfw(uri), (claim, resolvedResultsByQuery, isMature) => { +const makeSelectResolvedRecommendedContentForUri = (uri, size, claimId, claimName, claimTitle) => reselect.createSelector(makeSelectClaimForUri(uri), selectResolvedSearchResultsByQuery, makeSelectClaimIsNsfw(uri), (claim, resolvedResultsByQuery, isMature) => { const atVanityURI = !uri.includes('#'); + let currentUri; let recommendedContent; + let title; if (claim) { // always grab full URL - this can change once search returns canonical - const currentUri = buildURI({ streamClaimId: claim.claim_id, streamName: claim.name }); + currentUri = buildURI({ streamClaimId: claim.claim_id, streamName: claim.name }); + title = claim.value ? claim.value.title : null; + } else { + // for cases on mobile where the claim may not have been resolved () + currentUri = buildURI({ streamClaimId: claimId, streamName: claimName }); + title = claimTitle; + } - const { title } = claim.value; + if (!title) { + return; + } - if (!title) { - return; - } + const options = { related_to: claim ? claim.claim_id : claimId, size, isBackgroundSearch: 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); - recommendedContent = results; - } + const searchQuery = getSearchQueryString(title.replace(/\//, ' '), options); + let results = resolvedResultsByQuery[searchQuery]; + if (results) { + results = results.filter(result => buildURI({ streamClaimId: result.claimId, streamName: result.name }) !== currentUri); + recommendedContent = results; } return recommendedContent; @@ -5653,7 +5658,7 @@ function getDefaultKnownTags() { } const defaultState$8 = { - followedTags: [], + followedTags: DEFAULT_FOLLOWED_TAGS, knownTags: getDefaultKnownTags() }; @@ -5702,12 +5707,9 @@ const tagsReducer = handleActions({ }, [USER_STATE_POPULATE]: (state, action) => { const { tags } = action.data; - if (Array.isArray(tags)) { - return _extends$g({}, state, { - followedTags: tags - }); - } - return _extends$g({}, state); + return _extends$g({}, state, { + followedTags: tags && tags.length ? tags : DEFAULT_FOLLOWED_TAGS + }); } }, defaultState$8); diff --git a/src/constants/tags.js b/src/constants/tags.js index 291336d..3a1e26d 100644 --- a/src/constants/tags.js +++ b/src/constants/tags.js @@ -20,11 +20,11 @@ export const DEFAULT_KNOWN_TAGS = [ 'censorship', 'gaming', 'pop culture', - 'entertainment', + 'Entertainment', 'technology', 'music', 'funny', - 'education', + 'Education', 'learning', 'news', 'gameplay', @@ -32,13 +32,16 @@ export const DEFAULT_KNOWN_TAGS = [ 'beliefs', 'comedy', 'games', + 'sony interactive entertainment', 'film & animation', 'game', 'weapons', + "let's play", 'blockchain', 'video game', 'sports', 'walkthrough', + 'ps4live', 'art', 'pc', 'minecraft', @@ -46,6 +49,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'economics', 'automotive', 'play', + 'ps4share', 'tutorial', 'twitch', 'how to', @@ -56,16 +60,17 @@ export const DEFAULT_KNOWN_TAGS = [ 'lets play', 'fun', 'politics', - 'travel', + 'xbox', + 'autos & vehicles', + 'Travel & Events', 'food', 'science', - 'xbox', + 'xbox one', 'liberal', 'democrat', 'progressive', 'survival', - 'non-profits', - 'activism', + 'Nonprofits & Activism', 'cryptocurrency', 'playstation', 'nintendo', @@ -120,6 +125,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'lol', 'sony', 'god', + "let's", 'dance', 'pvp', 'tech', @@ -127,10 +133,12 @@ export const DEFAULT_KNOWN_TAGS = [ 'zombies', 'fail', 'film', - 'xbox360', + 'xbox 360', 'animation', 'unboxing', 'money', + 'how', + 'travel', 'wwe', 'mods', 'indie', @@ -138,6 +146,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'ios', 'history', 'rap', + 'sony computer entertainment', 'mobile', 'trump', 'hack', @@ -161,7 +170,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'mining', 'daily', 'diy', - 'pets', + 'pets & animals', 'videogame', 'death', 'funny moments', @@ -189,12 +198,14 @@ export const DEFAULT_KNOWN_TAGS = [ 'house', 'fire', 'bass', + 'bitcoin news', 'truth', 'crash', 'mario', 'league of legends', 'wii', 'mmorpg', + 'grand theft auto v', 'health', 'marvel', 'racing', @@ -228,6 +239,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'dota 2', 'studio', 'star wars', + 'gta 5', 'shooting', 'nasa', 'rock', @@ -260,6 +272,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'world of warcraft', 'industry', 'cartoon', + 'crypto news', 'garden', 'animals', 'windows', @@ -273,6 +286,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'parody', 'rv', 'beats', + 'fortnite battle royale', 'building', 'disney', 'drone', @@ -305,6 +319,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'canon', 'microsoft', 'camping', + 'cryptocurrency news', 'ufo', 'progressive talk', 'switch', @@ -340,6 +355,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'manga', 'howto', 'insane', + 'xbox360', 'press', 'special', 'church', @@ -356,7 +372,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'sound', 'christ', 'duty', - 'juvenile fiction', + 'Juvenile fiction', 'pc game', 'how-to', 'ww2', @@ -395,6 +411,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'style', 'travel trailer', 'rda', + '5859dfec-026f-46ba-bea0-02bf43aa1a6f', 'gun', 'secret', 'far cry 5', @@ -435,6 +452,8 @@ export const DEFAULT_KNOWN_TAGS = [ 'capcom', 'rta', 'discord', + 'action role-playing game', + 'playthrough part', 'batman', 'player', 'server', @@ -475,7 +494,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'paladins', 'warrior', 'creepypasta', - 'role-playing', + 'role-playing video game', 'solar', 'vr', 'animal', @@ -484,7 +503,7 @@ export const DEFAULT_KNOWN_TAGS = [ 'dota', 'audio', 'mass effect', - 'humour', + 'Humour', 'first look', 'videogames', 'future bass', diff --git a/src/lbry.js b/src/lbry.js index 146149d..ea72713 100644 --- a/src/lbry.js +++ b/src/lbry.js @@ -191,7 +191,7 @@ export function apiCall(method: string, params: ?{}, resolve: Function, reject: }), }; - return fetch(Lbry.daemonConnectionString + '?m=' + method, options) + return fetch(Lbry.daemonConnectionString, options) .then(checkAndParse) .then(response => { const error = response.error || (response.result && response.result.error); diff --git a/src/redux/reducers/tags.js b/src/redux/reducers/tags.js index b465376..206abf6 100644 --- a/src/redux/reducers/tags.js +++ b/src/redux/reducers/tags.js @@ -14,7 +14,7 @@ function getDefaultKnownTags() { } const defaultState: TagState = { - followedTags: [], + followedTags: DEFAULT_FOLLOWED_TAGS, knownTags: getDefaultKnownTags(), }; @@ -70,16 +70,10 @@ export const tagsReducer = handleActions( action: { data: { tags: ?Array } } ) => { const { tags } = action.data; - if (Array.isArray(tags)) { - return { - ...state, - followedTags: tags, - }; - } return { ...state, + followedTags: tags && tags.length ? tags : DEFAULT_FOLLOWED_TAGS, }; - }, }, defaultState diff --git a/src/redux/selectors/claims.js b/src/redux/selectors/claims.js index f359844..7b0c5dd 100644 --- a/src/redux/selectors/claims.js +++ b/src/redux/selectors/claims.js @@ -678,7 +678,13 @@ export const selectMyStreamUrlsCount = createSelector( channels => channels.length ); -export const makeSelectResolvedRecommendedContentForUri = (uri: string, size: number) => +export const makeSelectResolvedRecommendedContentForUri = ( + uri: string, + size: number, + claimId: string, + claimName: string, + claimTitle: string +) => createSelector( makeSelectClaimForUri(uri), selectResolvedSearchResultsByQuery, @@ -686,32 +692,37 @@ export const makeSelectResolvedRecommendedContentForUri = (uri: string, size: nu (claim, resolvedResultsByQuery, isMature) => { const atVanityURI = !uri.includes('#'); + let currentUri; let recommendedContent; + let title; if (claim) { // always grab full URL - this can change once search returns canonical - const currentUri = buildURI({ streamClaimId: claim.claim_id, streamName: claim.name }); + currentUri = buildURI({ streamClaimId: claim.claim_id, streamName: claim.name }); + title = claim.value ? claim.value.title : null; + } else { + // for cases on mobile where the claim may not have been resolved () + currentUri = buildURI({ streamClaimId: claimId, streamName: claimName }); + title = claimTitle; + } - const { title } = claim.value; + if (!title) { + return; + } - if (!title) { - return; - } + const options: { + related_to?: string, + nsfw?: boolean, + isBackgroundSearch?: boolean, + } = { related_to: claim ? claim.claim_id : claimId, size, isBackgroundSearch: false }; - const options: { - related_to?: string, - nsfw?: boolean, - isBackgroundSearch?: boolean, - } = { 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 - ); - recommendedContent = results; - } + const searchQuery = getSearchQueryString(title.replace(/\//, ' '), options); + let results = resolvedResultsByQuery[searchQuery]; + if (results) { + results = results.filter( + result => + buildURI({ streamClaimId: result.claimId, streamName: result.name }) !== currentUri + ); + recommendedContent = results; } return recommendedContent;