Use isShort field to check if short.

Instead of checking the video duration.
This commit is contained in:
Kavin 2022-10-27 10:36:13 +01:00
parent e40cfaeeeb
commit 667b1a4445
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -14,7 +14,7 @@
class="w-full"
:src="video.thumbnail"
:alt="video.title"
:class="{ 'shorts-img': short }"
:class="{ 'shorts-img': video.isShort }"
loading="lazy"
/>
<div class="relative text-sm">
@ -24,7 +24,7 @@
v-text="timeFormat(video.duration)"
/>
<!-- shorts thumbnail -->
<span class="thumbnail-overlay thumbnail-left" v-if="short" v-t="'video.shorts'" />
<span class="thumbnail-overlay thumbnail-left" v-if="video.isShort" v-t="'video.shorts'" />
<span
class="thumbnail-overlay thumbnail-right"
v-else-if="video.duration >= 60"
@ -184,11 +184,6 @@ export default {
};
},
},
computed: {
short() {
return this.video.duration > 0 && this.video.duration <= 61;
},
},
components: { PlaylistAddModal },
};
</script>