mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Clickbait thumbnail avoidance implementation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-card link :to="video.url" outlined :height="maxHeight ? '100%' : undefined" color="bgTwo">
|
||||
<img
|
||||
:src="video.thumbnail || video.thumbnailUrl"
|
||||
:src="imgURL"
|
||||
style="width: 100%; object-fit: contain"
|
||||
loading="lazy"
|
||||
/>
|
||||
@@ -61,6 +61,14 @@ export default {
|
||||
srcProgress: 'findIfVideoWatched'
|
||||
},
|
||||
|
||||
computed: {
|
||||
imgURL () {
|
||||
const url = this.video.thumbnail ?? this.video.thumbnailUrl
|
||||
const clickbaitAvoidance = this.$store.getters['prefs/getPreferenceBoolean']('clickbaitThumbnailAvoidance')
|
||||
return clickbaitAvoidance ? url.replace('hqdefault.jpg', 'hq2.jpg') : url
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async findIfVideoWatched () {
|
||||
// if it has source progress, it's already seen
|
||||
|
||||
@@ -67,6 +67,11 @@ export default {
|
||||
type: 'bool',
|
||||
default: true
|
||||
},
|
||||
{
|
||||
id: 'clickbaitThumbnailAvoidance',
|
||||
type: 'bool',
|
||||
default: false
|
||||
},
|
||||
{
|
||||
id: 'homepage',
|
||||
type: 'select',
|
||||
|
||||
@@ -13,6 +13,7 @@ const PrefsStore = {
|
||||
proxyLBRY: true,
|
||||
sponsorblock: true,
|
||||
skipToLastPoint: true,
|
||||
clickbaitThumbnailAvoidance: false,
|
||||
|
||||
selectedSkip: []
|
||||
}
|
||||
|
||||
@@ -82,8 +82,9 @@
|
||||
"playerAutoplay": "video নিজে থেকে চলবে কি না",
|
||||
"listen": "শুধু আওয়াজ শুনবেন কি না",
|
||||
"quality": "এই উৎকর্ষের videoটি লোড করা হবে যদি না আপনি অন্য কোনো পছন্দ করেন । ",
|
||||
"region": "ইউটিউব ভাববে যে আপনি এই জায়গা তে আছেন ",
|
||||
"region": "ইউটিউব ভাববে যে আপনি এই জায়গা তে আছেন",
|
||||
"homepage": "ওয়েবসাইট খোলার পর গতানুগতিক কি দেখবেন",
|
||||
"instance": "আমাদের প্রতিনিধি যে ইউটিউব এর সঙ্গে সব যোগাযোগ এর নিয়ন্ত্রণ আর দেখাশোনা করবে"
|
||||
"instance": "আমাদের প্রতিনিধি যে ইউটিউব এর সঙ্গে সব যোগাযোগ এর নিয়ন্ত্রণ আর দেখাশোনা করবে",
|
||||
"clickbaitThumbnailAvoidance": "videoএর যে thumbnail আছে সেটা কি একতা স্বয়ংক্রিয়ভাবে বানানো thumbnail দিয়ে প্রতিস্থাপন করে দেব?"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
"quality": "Default Quality",
|
||||
"region": "Country Selection",
|
||||
"homepage": "Default Homepage",
|
||||
"instance": "Instance"
|
||||
"instance": "Instance",
|
||||
"clickbaitThumbnailAvoidance": "Replace default thumbnails with an automatically generated one"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user