mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Use isShort field to check if short.
Instead of checking the video duration.
This commit is contained in:
parent
e40cfaeeeb
commit
667b1a4445
1 changed files with 2 additions and 7 deletions
|
@ -14,7 +14,7 @@
|
||||||
class="w-full"
|
class="w-full"
|
||||||
:src="video.thumbnail"
|
:src="video.thumbnail"
|
||||||
:alt="video.title"
|
:alt="video.title"
|
||||||
:class="{ 'shorts-img': short }"
|
:class="{ 'shorts-img': video.isShort }"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
<div class="relative text-sm">
|
<div class="relative text-sm">
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
v-text="timeFormat(video.duration)"
|
v-text="timeFormat(video.duration)"
|
||||||
/>
|
/>
|
||||||
<!-- shorts thumbnail -->
|
<!-- 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
|
<span
|
||||||
class="thumbnail-overlay thumbnail-right"
|
class="thumbnail-overlay thumbnail-right"
|
||||||
v-else-if="video.duration >= 60"
|
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 },
|
components: { PlaylistAddModal },
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue