mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2025-11-04 14:41:57 +00:00 
			
		
		
		
	Use isShort field to check if short.
Instead of checking the video duration.
This commit is contained in:
		@@ -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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user