From 30303a80d3238982df6aa408eeece8e567bc9c8e Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Thu, 22 Jan 2026 01:15:35 +0100 Subject: [PATCH] Not using NATS redirect URL for independent channels. Showing independent channels first in list. --- src/entities.js | 5 ++++- src/scenes.js | 3 ++- static | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/entities.js b/src/entities.js index 37681ed..2f3fa98 100644 --- a/src/entities.js +++ b/src/entities.js @@ -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') diff --git a/src/scenes.js b/src/scenes.js index 9667045..289867b 100644 --- a/src/scenes.js +++ b/src/scenes.js @@ -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, diff --git a/static b/static index 069fc04..2d30a16 160000 --- a/static +++ b/static @@ -1 +1 @@ -Subproject commit 069fc048b6a8a00d898d2593f9375c50b45a828a +Subproject commit 2d30a16b0752c38ab5079b6c4690eaf149dde7c2