Not using NATS redirect URL for independent channels. Showing independent channels first in list.
This commit is contained in:
parent
66c1cbab6a
commit
30303a80d3
|
|
@ -113,7 +113,10 @@ export async function fetchEntitiesById(entityIds, options = {}, reqUser) {
|
|||
options.includeChildren ? knex('entities')
|
||||
.whereIn('entities.parent_id', entityIds)
|
||||
.whereNot('type', 'info')
|
||||
.orderBy('slug') : [],
|
||||
.orderBy([
|
||||
{ column: 'independent', order: 'desc' },
|
||||
{ column: 'slug', order: 'asc' },
|
||||
]) : [],
|
||||
knex('entities_tags')
|
||||
.select('entity_id', 'tags.*')
|
||||
.leftJoin('tags', 'tags.id', 'tag_id')
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ function getAffiliateUrl(scene) {
|
|||
return watchUrl;
|
||||
}
|
||||
|
||||
if (scene.affiliate.url?.includes('/track')) { // standard NATS redirect
|
||||
if (scene.affiliate.url?.includes('/track') && (!scene.channel.isIndependent || scene.channel.id === scene.affiliate.entityId)) { // standard NATS redirect
|
||||
const { pathname, search } = new URL(watchUrl);
|
||||
|
||||
return `${scene.affiliate.url}${pathname.replace(/^\/trial/, '')}${search}`; // replace needed for Jules Jordan, verify behavior on other sites
|
||||
|
|
@ -108,6 +108,7 @@ function curateScene(rawScene, assets) {
|
|||
id: assets.channel.affiliate.id,
|
||||
url: assets.channel.affiliate.url,
|
||||
parameters: assets.channel.affiliate.parameters,
|
||||
entityId: assets.channel.affiliate.entity_id,
|
||||
} : null,
|
||||
actors: sortActorsByGender(assets.actors.map((actor) => curateActor(actor, {
|
||||
sceneDate: rawScene.effective_date,
|
||||
|
|
|
|||
2
static
2
static
|
|
@ -1 +1 @@
|
|||
Subproject commit 069fc048b6a8a00d898d2593f9375c50b45a828a
|
||||
Subproject commit 2d30a16b0752c38ab5079b6c4690eaf149dde7c2
|
||||
Loading…
Reference in New Issue