Compare commits

..

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian edb4be379f 0.42.15 2026-01-20 02:43:30 +01:00
DebaucheryLibrarian 363a6b4084 Changed affiliate query to ensure channel priority. 2026-01-20 02:43:28 +01:00
4 changed files with 8 additions and 7 deletions

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{ {
"name": "traxxx-web", "name": "traxxx-web",
"version": "0.42.14", "version": "0.42.15",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "0.42.14", "version": "0.42.15",
"dependencies": { "dependencies": {
"@brillout/json-serializer": "^0.5.8", "@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5", "@dicebear/collection": "^7.0.5",

View File

@ -87,7 +87,7 @@
"overrides": { "overrides": {
"vite": "$vite" "vite": "$vite"
}, },
"version": "0.42.14", "version": "0.42.15",
"imports": { "imports": {
"#/*": "./*.js" "#/*": "./*.js"
} }

View File

@ -194,13 +194,14 @@ export async function fetchScenesById(sceneIds, { reqUser, ...context } = {}) {
'networks.name as network_name', 'networks.name as network_name',
'networks.type as network_type', 'networks.type as network_type',
'networks.has_logo as network_has_logo', 'networks.has_logo as network_has_logo',
knex.raw('row_to_json(affiliates) as affiliate'), knex.raw('row_to_json(coalesce(channel_affiliates, network_affiliates)) as affiliate'),
) )
.whereIn('releases.id', sceneIds) .whereIn('releases.id', sceneIds)
.leftJoin('entities as channels', 'channels.id', 'releases.entity_id') .leftJoin('entities as channels', 'channels.id', 'releases.entity_id')
.leftJoin('entities as networks', 'networks.id', 'channels.parent_id') .leftJoin('entities as networks', 'networks.id', 'channels.parent_id')
.leftJoin('affiliates', knex.raw('affiliates.entity_id in (channels.id, networks.id)')) .leftJoin('affiliates as channel_affiliates', 'channel_affiliates.entity_id', 'channels.id')
.groupBy('channels.id', 'networks.id', 'affiliates.id'), .leftJoin('affiliates as network_affiliates', 'network_affiliates.entity_id', 'networks.id')
.groupBy('channels.id', 'networks.id', 'channel_affiliates.id', 'network_affiliates.id'),
studios: knex('releases') studios: knex('releases')
.whereIn('releases.id', sceneIds) .whereIn('releases.id', sceneIds)
.leftJoin('entities as studios', 'studios.id', 'releases.studio_id'), .leftJoin('entities as studios', 'studios.id', 'releases.studio_id'),

2
static

@ -1 +1 @@
Subproject commit 3df11850ec6038c0919f6eaedb83bc8312fa8e07 Subproject commit 069fc048b6a8a00d898d2593f9375c50b45a828a