When poster is not available during scraping, first photo is stored as poster; removed client-side fallback. Added screencap album fallback to Jules Jordan scraper. Simplified JJ page traversal.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<video
|
||||
v-if="release.trailer"
|
||||
:src="`/media/${release.trailer.path}`"
|
||||
:poster="`/media/${(release.poster && release.poster.thumbnail) || (release.photos.length && release.photos[Math.floor(Math.random() * release.photos.length)].path)}`"
|
||||
:poster="`/media/${(release.poster && release.poster.thumbnail)}`"
|
||||
:alt="release.title"
|
||||
class="item trailer-video"
|
||||
controls
|
||||
@@ -47,21 +47,16 @@
|
||||
|
||||
<script>
|
||||
function photos() {
|
||||
if (this.release.photos.length) {
|
||||
const set = this.release.photos.sort(({ index: indexA }, { index: indexB }) => indexA - indexB);
|
||||
|
||||
if (this.release.trailer) {
|
||||
return set;
|
||||
}
|
||||
|
||||
return [this.release.poster].concat(set);
|
||||
if (this.release.trailer) {
|
||||
// poster will be on trailer video
|
||||
return this.release.photos;
|
||||
}
|
||||
|
||||
if (this.release.poster && !this.release.trailer) {
|
||||
return [this.release.poster];
|
||||
if (this.release.poster) {
|
||||
return [this.release.poster].concat(this.release.photos);
|
||||
}
|
||||
|
||||
return [];
|
||||
return this.release.photos;
|
||||
}
|
||||
|
||||
function scrollBanner(event) {
|
||||
|
||||
Reference in New Issue
Block a user