Clickbait thumbnail avoidance implementation

This commit is contained in:
root
2022-04-19 14:06:37 +05:30
parent dfbad49dd5
commit 5c54ca13d6
5 changed files with 20 additions and 4 deletions
+9 -1
View File
@@ -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
+5
View File
@@ -67,6 +67,11 @@ export default {
type: 'bool',
default: true
},
{
id: 'clickbaitThumbnailAvoidance',
type: 'bool',
default: false
},
{
id: 'homepage',
type: 'select',
+1
View File
@@ -13,6 +13,7 @@ const PrefsStore = {
proxyLBRY: true,
sponsorblock: true,
skipToLastPoint: true,
clickbaitThumbnailAvoidance: false,
selectedSkip: []
}
+3 -2
View File
@@ -82,8 +82,9 @@
"playerAutoplay": "video নিজে থেকে চলবে কি না",
"listen": "শুধু আওয়াজ শুনবেন কি না",
"quality": "এই উৎকর্ষের videoটি লোড করা হবে যদি না আপনি অন্য কোনো পছন্দ করেন । ",
"region": "ইউটিউব ভাববে যে আপনি এই জায়গা তে আছেন ",
"region": "ইউটিউব ভাববে যে আপনি এই জায়গা তে আছেন",
"homepage": "ওয়েবসাইট খোলার পর গতানুগতিক কি দেখবেন",
"instance": "আমাদের প্রতিনিধি যে ইউটিউব এর সঙ্গে সব যোগাযোগ এর নিয়ন্ত্রণ আর দেখাশোনা করবে"
"instance": "আমাদের প্রতিনিধি যে ইউটিউব এর সঙ্গে সব যোগাযোগ এর নিয়ন্ত্রণ আর দেখাশোনা করবে",
"clickbaitThumbnailAvoidance": "videoএর যে thumbnail আছে সেটা কি একতা স্বয়ংক্রিয়ভাবে বানানো thumbnail দিয়ে প্রতিস্থাপন করে দেব?"
}
}
+2 -1
View File
@@ -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"
}
}