Showing teaser of trailer is not available on scene page.

This commit is contained in:
DebaucheryLibrarian 2024-06-04 00:44:28 +02:00
parent 988ee9bdcf
commit 774f171c5c
4 changed files with 23 additions and 12 deletions

View File

@ -3,10 +3,19 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,interactive-widget=resizes-content" />
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
<link rel="manifest" href="/img/favicon/site.webmanifest">
<link rel="mask-icon" href="/img/favicon/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="/img/favicon/favicon.ico">
<meta name="msapplication-TileColor" content="#b91d47">
<meta name="msapplication-config" content="/img/favicon/browserconfig.xml">
<meta name="theme-color" content="#f65596">
<title>traxxx - consent</title>
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,interactive-widget=resizes-content" />
<title>traxxx - Consent</title>
<style>
:root {
--primary: #f65596;

View File

@ -36,7 +36,7 @@
>
<img
v-if="network.hasLogo"
:src="`/logos/${network.slug}/network.png`"
:src="network.type === 'network' || network.isIndependent || !network.parent ? `/logos/${network.slug}/network.png` : `/logos/${network.parent.slug}/${network.slug}.png`"
:alt="network.name"
class="logo"
>
@ -44,7 +44,7 @@
<span v-else>{{ network.name }}</span>
<Icon
v-if="query && network.type === 'network'"
v-if="pageContext.urlParsed.search.q && network.type === 'network'"
icon="device_hub"
/>
</a>

View File

@ -7,11 +7,11 @@
>
<div class="banner">
<div
v-if="scene.trailer"
v-if="scene.trailer || scene.teaser"
class="trailer"
>
<Player
:video="scene.trailer"
:video="scene.trailer || scene.teaser"
:poster="poster"
class="item"
:class="{ playing }"

View File

@ -25,28 +25,30 @@ export function curateEntity(entity, context) {
export async function fetchEntities(options) {
const entities = await knex('entities')
.select('entities.*', knex.raw('row_to_json(parents) as parent'))
.modify((builder) => {
if (options.query) {
builder.where((whereBuilder) => {
whereBuilder
.whereILike('name', `%${options.query}%`)
.orWhereILike('slug', `%${options.query}%`);
.whereILike('entities.name', `%${options.query}%`)
.orWhereILike('entities.slug', `%${options.query}%`);
});
}
if (options.type === 'primary') {
builder
.where('type', 'network')
.orWhere('independent', true)
.orWhereNull('parent_id');
.where('entities.type', 'network')
.orWhere('entities.independent', true)
.orWhereNull('entities.parent_id');
return;
}
if (options.type) {
builder.where('type', options.type);
builder.where('entities.type', options.type);
}
})
.leftJoin('entities as parents', 'parents.id', 'entities.parent_id')
.orderBy(...(options.order || ['name', 'asc']))
.limit(options.limit || 1000);