Compare commits

...

3 Commits

Author SHA1 Message Date
DebaucheryLibrarian 5a975ad0bf 1.159.9 2021-01-25 23:25:14 +01:00
DebaucheryLibrarian b80eca35d8 Fixed Gamma scraper breaking when scene has no movie. Improved missing thumbnail presentation on mobile scene tiles. 2021-01-25 23:24:51 +01:00
DebaucheryLibrarian dba99a4170 Showing cover or first photo as movie trailer poster. 2021-01-25 23:15:41 +01:00
6 changed files with 42 additions and 9 deletions

View File

@ -11,7 +11,7 @@
<video
v-if="release.trailer"
:src="`/media/${release.trailer.path}`"
:poster="release.poster && (sfw ? `/img/${release.poster.sfw.thumbnail}` : `/media/${release.poster.thumbnail}`)"
:poster="poster"
:alt="release.title"
:class="{ sfw: sfw && paused }"
class="item trailer"
@ -23,7 +23,7 @@
<video
v-else-if="release.teaser && /^video\//.test(release.teaser.mime)"
:src="`/media/${release.teaser.path}`"
:poster="release.poster && (sfw ? `/img/${release.poster.sfw.thumbnail}` : `/media/${release.poster.thumbnail}`)"
:poster="poster"
:alt="release.title"
:class="{ sfw: sfw && paused }"
class="item trailer"
@ -114,6 +114,22 @@ function sfw() {
return this.$store.state.ui.sfw;
}
function poster() {
if (this.release.poster) {
return sfw ? `/img/${this.release.poster.sfw.thumbnail}` : `/media/${this.release.poster.thumbnail}`;
}
if (this.release.covers?.length > 0) {
return this.sfw ? `/img/${this.release.covers[0].sfw.path}` : `/media/${this.release.covers[0].path}`;
}
if (this.photos?.length > 0) {
return this.sfw ? `/img/${this.photos[0].sfw.thumbnail}` : `/media/${this.photos[0].thumbnail}`;
}
return null;
}
function photos() {
const clips = this.release.clips || [];
const clipPostersById = clips.reduce((acc, clip) => ({ ...acc, [clip.poster.id]: clip.poster }), {});
@ -157,6 +173,7 @@ export default {
},
computed: {
photos,
poster,
sfw,
},
};

View File

@ -44,8 +44,8 @@
<div
v-else
:title="release.title"
class="thumbnail"
>No thumbnail available</div>
class="thumbnail unavailable"
><Icon icon="blocked" />No thumbnail available</div>
</a>
</span>
@ -213,6 +213,13 @@ export default {
background-color: var(--shadow-hint);
color: var(--shadow);
text-shadow: 1px 1px 0 var(--highlight);
.icon {
display: none;
width: 2rem;
height: 2rem;
fill: var(--shadow-hint);
}
}
.row {
@ -339,7 +346,12 @@ export default {
.thumbnail {
width: 9rem;
height: 100%;
font-size: 0;
box-shadow: 0 0 3px var(--shadow-weak);
.icon {
display: block;
}
}
.info {

View File

@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
<title>blocked</title>
<path d="M27.314 4.686c-3.022-3.022-7.040-4.686-11.314-4.686s-8.292 1.664-11.314 4.686c-3.022 3.022-4.686 7.040-4.686 11.314s1.664 8.292 4.686 11.314c3.022 3.022 7.040 4.686 11.314 4.686s8.292-1.664 11.314-4.686c3.022-3.022 4.686-7.040 4.686-11.314s-1.664-8.292-4.686-11.314zM28 16c0 2.588-0.824 4.987-2.222 6.949l-16.727-16.727c1.962-1.399 4.361-2.222 6.949-2.222 6.617 0 12 5.383 12 12zM4 16c0-2.588 0.824-4.987 2.222-6.949l16.727 16.727c-1.962 1.399-4.361 2.222-6.949 2.222-6.617 0-12-5.383-12-12z"></path>
</svg>

After

Width:  |  Height:  |  Size: 671 B

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.159.8",
"version": "1.159.9",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.159.8",
"version": "1.159.9",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -304,10 +304,9 @@ async function scrapeScene(html, url, site, baseRelease, mobileHtml) {
];
const movie = $('.dvdLink');
const movieUrl = qu.prefixUrl(movie.attr('href'), site.url);
if (movie) {
const movieUrl = qu.prefixUrl(movie.attr('href'), site.url);
if (movieUrl) {
release.movie = {
url: movieUrl,
title: movie.attr('title'),