Scene tile uses first photo if poster is unavailable.

This commit is contained in:
DebaucheryLibrarian
2021-02-08 02:10:56 +01:00
parent 998774fe5c
commit 73b28866ac
4 changed files with 19 additions and 15 deletions

View File

@@ -26,20 +26,14 @@
loading="lazy"
>
<span
v-else-if="release.covers && release.covers.length > 0"
class="covers"
<img
v-else-if="release.photos && release.photos.length > 0"
:src="sfw ? `/img/${release.photos[0].sfw.thumbnail}` : `/media/${release.photos[0].thumbnail}`"
:style="{ 'background-image': sfw ? `/img/${release.photos[0].sfw.lazy}` : `/media/${release.photos[0].lazy}` }"
:alt="release.title"
class="thumbnail"
loading="lazy"
>
<img
v-for="cover in release.covers"
:key="cover.id"
:src="sfw ? `/img/${cover.sfw.thumbnail}` : `/media/${cover.thumbnail}`"
:style="{ 'background-image': sfw ? `/img/${cover.sfw.lazy}` : `/media/${cover.lazy}` }"
:alt="release.title"
class="thumbnail cover"
loading="lazy"
>
</span>
<div
v-else