Added site filter to Gamma API actor fetch for more accurate profile results.
This commit is contained in:
parent
dc21571a6f
commit
e91ff659e9
|
|
@ -875,12 +875,13 @@ const networks = [
|
||||||
name: 'XEmpire',
|
name: 'XEmpire',
|
||||||
url: 'https://www.xempire.com',
|
url: 'https://www.xempire.com',
|
||||||
description: 'XEmpire.com brings you today\'s top pornstars in beautifully shot, HD sex scenes across 4 unique porn sites of gonzo porn, interracial, lesbian & erotica!',
|
description: 'XEmpire.com brings you today\'s top pornstars in beautifully shot, HD sex scenes across 4 unique porn sites of gonzo porn, interracial, lesbian & erotica!',
|
||||||
|
parent: 'gamma',
|
||||||
parameters: {
|
parameters: {
|
||||||
layout: 'api',
|
layout: 'api',
|
||||||
actorScenes: 'https://www.xempire.com/en/videos/xempire/latest/{page}/All-Categories/0{actorPath}',
|
|
||||||
sceneMovies: false,
|
sceneMovies: false,
|
||||||
|
actorScenes: 'https://www.xempire.com/en/videos/xempire/latest/{page}/All-Categories/0{actorPath}',
|
||||||
|
actorAvailableOnSites: ['allblackx', 'darkx', 'eroticax', 'hardx', 'lesbianx', 'xempire', 'xempirepartners'],
|
||||||
},
|
},
|
||||||
parent: 'gamma',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
slug: 'zerotolerance',
|
slug: 'zerotolerance',
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,6 @@ module.exports = {
|
||||||
'3rddegreefilms': gamma,
|
'3rddegreefilms': gamma,
|
||||||
addicted2girls: gamma,
|
addicted2girls: gamma,
|
||||||
biphoria: gamma,
|
biphoria: gamma,
|
||||||
blakemason: gamma,
|
|
||||||
blowpass: gamma,
|
blowpass: gamma,
|
||||||
burningangel: gamma,
|
burningangel: gamma,
|
||||||
chaosmen: gamma,
|
chaosmen: gamma,
|
||||||
|
|
|
||||||
|
|
@ -927,18 +927,19 @@ async function fetchProfile({ name: actorName }, context, include, altSearchUrl,
|
||||||
|
|
||||||
async function fetchApiProfile({ name: actorName }, context, include) {
|
async function fetchApiProfile({ name: actorName }, context, include) {
|
||||||
const siteSlug = context.entity.slug || context.site?.slug || context.network?.slug;
|
const siteSlug = context.entity.slug || context.site?.slug || context.network?.slug;
|
||||||
|
|
||||||
const actorSlug = encodeURI(actorName);
|
const actorSlug = encodeURI(actorName);
|
||||||
// const referer = `https://www.${siteSlug}.com/en/search`;
|
const referer = `${context.entity.origin}/en/search`;
|
||||||
const referer = `${new URL(context.entity.url).origin}/en/search`;
|
|
||||||
|
|
||||||
const { apiUrl } = await fetchApiCredentials(referer);
|
const { apiUrl } = await fetchApiCredentials(referer);
|
||||||
|
|
||||||
|
const availableOnSites = (context.parameters.actorAvailableOnSites || [siteSlug]).map((site) => `"availableOnSite:${site}"`).join(',');
|
||||||
|
|
||||||
const res = await http.post(apiUrl, {
|
const res = await http.post(apiUrl, {
|
||||||
requests: [
|
requests: [
|
||||||
{
|
{
|
||||||
indexName: 'all_actors',
|
indexName: 'all_actors',
|
||||||
params: `query=${actorSlug}`,
|
params: `query=${actorSlug}&facetFilters=[[${availableOnSites}]]`,
|
||||||
|
// params: `query=${actorSlug}`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}, {
|
}, {
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ const actors = [
|
||||||
{ entity: 'burningangel', name: 'Joanna Angel', fields: ['avatar', 'gender'] },
|
{ entity: 'burningangel', name: 'Joanna Angel', fields: ['avatar', 'gender'] },
|
||||||
{ entity: 'chaosmen', name: 'Kenzo Alvarez', fields: ['avatar', 'gender'] },
|
{ entity: 'chaosmen', name: 'Kenzo Alvarez', fields: ['avatar', 'gender'] },
|
||||||
{ entity: 'dogfartnetwork', name: 'Liz Jordan', fields: ['avatar', 'gender'] },
|
{ entity: 'dogfartnetwork', name: 'Liz Jordan', fields: ['avatar', 'gender'] },
|
||||||
|
{ entity: 'devilsfilm', name: 'Katrina Colt', fields: ['avatar', 'gender'] },
|
||||||
{ entity: 'diabolic', name: 'Kira Noir', fields: ['avatar', 'gender'] },
|
{ entity: 'diabolic', name: 'Kira Noir', fields: ['avatar', 'gender'] },
|
||||||
{ entity: 'evilangel', name: 'Francesca Le', fields: ['avatar', 'gender'] },
|
{ entity: 'evilangel', name: 'Francesca Le', fields: ['avatar', 'gender'] },
|
||||||
{ entity: 'fantasymassage', name: 'Cherry Kiss', fields: ['avatar', 'gender', 'description', 'eyes', 'hairColor'] },
|
{ entity: 'fantasymassage', name: 'Cherry Kiss', fields: ['avatar', 'gender', 'description', 'eyes', 'hairColor'] },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue