From 2fd8a234c9a6e2148a69d268b079851c08c5bf38 Mon Sep 17 00:00:00 2001 From: david-frederick-batt Date: Tue, 15 Aug 2023 16:43:23 +0200 Subject: [PATCH 01/13] Add option to blur thumbnails --- .../distraction-settings/distraction-settings.js | 6 +++++- .../distraction-settings/distraction-settings.vue | 6 ++++++ src/renderer/components/ft-list-video/ft-list-video.js | 8 ++++++++ src/renderer/components/ft-list-video/ft-list-video.scss | 4 ++++ src/renderer/components/ft-list-video/ft-list-video.vue | 1 + src/renderer/store/modules/settings.js | 1 + static/locales/en-US.yaml | 1 + 7 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/distraction-settings/distraction-settings.js b/src/renderer/components/distraction-settings/distraction-settings.js index ea67fe25bd60b..8d4d0379d869c 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.js +++ b/src/renderer/components/distraction-settings/distraction-settings.js @@ -92,6 +92,9 @@ export default defineComponent({ showDistractionFreeTitles: function () { return this.$store.getters.getShowDistractionFreeTitles }, + blurThumbnails: function () { + return this.$store.getters.getBlurThumbnails + }, channelsHidden: function () { return JSON.parse(this.$store.getters.getChannelsHidden) }, @@ -144,7 +147,8 @@ export default defineComponent({ 'updateHideChannelReleases', 'updateHideSubscriptionsVideos', 'updateHideSubscriptionsShorts', - 'updateHideSubscriptionsLive' + 'updateHideSubscriptionsLive', + 'updateBlurThumbnails' ]) } }) diff --git a/src/renderer/components/distraction-settings/distraction-settings.vue b/src/renderer/components/distraction-settings/distraction-settings.vue index dc1af66a7663e..daf4f6506db9b 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.vue +++ b/src/renderer/components/distraction-settings/distraction-settings.vue @@ -193,6 +193,12 @@ :default-value="hideSharingActions" @change="updateHideSharingActions" /> +
Date: Tue, 15 Aug 2023 17:48:08 +0200 Subject: [PATCH 02/13] Add dropdown for different thumbnail display modes --- static/locales/en-US.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index d89807941ae49..b289fdeed3dea 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -332,7 +332,6 @@ Settings: Channel Page: Channel Page Watch Page: Watch Page General: General - Blur Thumbnails: Blur Thumbnails Hide Video Views: Hide Video Views Hide Video Likes And Dislikes: Hide Video Likes And Dislikes Hide Channel Subscribers: Hide Channel Subscribers @@ -361,6 +360,11 @@ Settings: Hide Subscriptions Videos: Hide Subscriptions Videos Hide Subscriptions Shorts: Hide Subscriptions Shorts Hide Subscriptions Live: Hide Subscriptions Live + Thumbnail Display Mode: + Thumbnail Display Mode: Thumbnail Display Mode + Default: Default + Not Loaded: Not Loaded + Blurred: Blurred Data Settings: Data Settings: Data Settings Select Import Type: Select Import Type From 7eb5c9e4a36d1c61a23bae7d5d8c8aac73f99a1c Mon Sep 17 00:00:00 2001 From: david-frederick-batt Date: Tue, 15 Aug 2023 17:49:25 +0200 Subject: [PATCH 03/13] Add dropdown for different thumbnail display modes --- .../distraction-settings.js | 26 ++++++++++++++++--- .../distraction-settings.vue | 11 ++++---- .../components/ft-list-video/ft-list-video.js | 8 +++--- src/renderer/store/modules/settings.js | 2 +- 4 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/renderer/components/distraction-settings/distraction-settings.js b/src/renderer/components/distraction-settings/distraction-settings.js index 8d4d0379d869c..2865d4a988fa9 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.js +++ b/src/renderer/components/distraction-settings/distraction-settings.js @@ -4,6 +4,7 @@ import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue' import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue' import FtInputTags from '../../components/ft-input-tags/ft-input-tags.vue' import FtFlexBox from '../ft-flex-box/ft-flex-box.vue' +import FtSelect from '../ft-select/ft-select.vue' export default defineComponent({ name: 'PlayerSettings', @@ -11,7 +12,17 @@ export default defineComponent({ 'ft-settings-section': FtSettingsSection, 'ft-toggle-switch': FtToggleSwitch, 'ft-input-tags': FtInputTags, - 'ft-flex-box': FtFlexBox + 'ft-flex-box': FtFlexBox, + 'ft-select': FtSelect + }, + data: function () { + return { + thumbnailDisplayModeValues: [ + 'default', + 'not-loaded', + 'blurred' + ] + } }, computed: { hideVideoViews: function () { @@ -92,8 +103,15 @@ export default defineComponent({ showDistractionFreeTitles: function () { return this.$store.getters.getShowDistractionFreeTitles }, - blurThumbnails: function () { - return this.$store.getters.getBlurThumbnails + thumbnailDisplayMode: function () { + return this.$store.getters.getThumbnailDisplayMode + }, + thumbnailDisplayModeNames: function () { + return [ + this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Default'), + this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Not Loaded'), + this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Blurred') + ] }, channelsHidden: function () { return JSON.parse(this.$store.getters.getChannelsHidden) @@ -148,7 +166,7 @@ export default defineComponent({ 'updateHideSubscriptionsVideos', 'updateHideSubscriptionsShorts', 'updateHideSubscriptionsLive', - 'updateBlurThumbnails' + 'updateThumbnailDisplayMode' ]) } }) diff --git a/src/renderer/components/distraction-settings/distraction-settings.vue b/src/renderer/components/distraction-settings/distraction-settings.vue index daf4f6506db9b..b25abc461d1c9 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.vue +++ b/src/renderer/components/distraction-settings/distraction-settings.vue @@ -193,11 +193,12 @@ :default-value="hideSharingActions" @change="updateHideSharingActions" /> -
diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index bc9a391923e86..b5df4138ff7db 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -88,12 +88,12 @@ export default defineComponent({ return this.$store.getters.getThumbnailPreference }, - blurThumbnails: function () { - return this.$store.getters.getBlurThumbnails + thumbnailDisplayMode: function () { + return this.$store.getters.getThumbnailDisplayMode }, blurStyle: function () { - return this.blurThumbnails ? 'blur(20px)' : 'none' + return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : 'none' }, backendPreference: function () { @@ -234,7 +234,7 @@ export default defineComponent({ thumbnail: function () { let baseUrl - if (this.backendPreference === 'invidious') { + if (this.backendPreference === 'invidious' && this.thumbnailDisplayMode !== 'not-loaded') { baseUrl = this.currentInvidiousInstance } else { baseUrl = 'https://i.ytimg.com' diff --git a/src/renderer/store/modules/settings.js b/src/renderer/store/modules/settings.js index baaaf0ca3d980..c851183a664d8 100644 --- a/src/renderer/store/modules/settings.js +++ b/src/renderer/store/modules/settings.js @@ -166,7 +166,6 @@ const state = { backendFallback: process.env.IS_ELECTRON, backendPreference: !process.env.IS_ELECTRON ? 'invidious' : 'local', barColor: false, - blurThumbnails: false, checkForBlogPosts: true, checkForUpdates: true, baseTheme: 'system', @@ -273,6 +272,7 @@ const state = { skip: 'doNothing' }, thumbnailPreference: '', + thumbnailDisplayMode: 'default', useProxy: false, useRssFeeds: false, useSponsorBlock: false, From f7b08190cbe64a32e7adea68e50a4ce2160fbfb4 Mon Sep 17 00:00:00 2001 From: david-frederick-batt Date: Tue, 15 Aug 2023 21:17:56 +0200 Subject: [PATCH 04/13] Fix thumbnail display mode setting not appearing due to incorrect localization --- .../components/distraction-settings/distraction-settings.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/distraction-settings/distraction-settings.vue b/src/renderer/components/distraction-settings/distraction-settings.vue index b25abc461d1c9..22f8f9b16d37f 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.vue +++ b/src/renderer/components/distraction-settings/distraction-settings.vue @@ -194,7 +194,7 @@ @change="updateHideSharingActions" /> Date: Tue, 15 Aug 2023 21:20:28 +0200 Subject: [PATCH 05/13] Rename thumbnail display mode option 'Not Loaded' to 'Hidden' --- .../components/distraction-settings/distraction-settings.js | 4 ++-- static/locales/en-US.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/distraction-settings/distraction-settings.js b/src/renderer/components/distraction-settings/distraction-settings.js index 2865d4a988fa9..0646df780a428 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.js +++ b/src/renderer/components/distraction-settings/distraction-settings.js @@ -19,7 +19,7 @@ export default defineComponent({ return { thumbnailDisplayModeValues: [ 'default', - 'not-loaded', + 'hidden', 'blurred' ] } @@ -109,7 +109,7 @@ export default defineComponent({ thumbnailDisplayModeNames: function () { return [ this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Default'), - this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Not Loaded'), + this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Hidden'), this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Blurred') ] }, diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index b289fdeed3dea..22682cdcde337 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -363,7 +363,7 @@ Settings: Thumbnail Display Mode: Thumbnail Display Mode: Thumbnail Display Mode Default: Default - Not Loaded: Not Loaded + Hidden: Hidden Blurred: Blurred Data Settings: Data Settings: Data Settings From acd5b58802613db92b9bd1527786be08f1069dba Mon Sep 17 00:00:00 2001 From: david-frederick-batt Date: Wed, 16 Aug 2023 10:42:50 +0200 Subject: [PATCH 06/13] Fix thumbnail display mode 'hidden' not working --- .../assets/img/thumbnail_placeholder.png | Bin 0 -> 461859 bytes .../components/ft-list-video/ft-list-video.js | 7 +++++-- .../components/ft-list-video/ft-list-video.vue | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 src/renderer/assets/img/thumbnail_placeholder.png diff --git a/src/renderer/assets/img/thumbnail_placeholder.png b/src/renderer/assets/img/thumbnail_placeholder.png new file mode 100644 index 0000000000000000000000000000000000000000..68f6b04c1577d17309f23e6a187c871f0926442d GIT binary patch literal 461859 zcmeI*ZLDQyRRG}kPCu9y&UBbg8>~kBQGf6UBdCpuF_cV|k=TeGNb!eCXf0?$$4;>o zdQG^d3AB*lFAan!O4NX9qER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ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index b5df4138ff7db..3c7a6b36f1cca 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -92,7 +92,7 @@ export default defineComponent({ return this.$store.getters.getThumbnailDisplayMode }, - blurStyle: function () { + thumbnailBlurStyle: function () { return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : 'none' }, @@ -233,8 +233,11 @@ export default defineComponent({ }, thumbnail: function () { + if (this.thumbnailDisplayMode === 'hidden') { + return require('../../assets/img/thumbnail_placeholder.png') + } let baseUrl - if (this.backendPreference === 'invidious' && this.thumbnailDisplayMode !== 'not-loaded') { + if (this.backendPreference === 'invidious') { baseUrl = this.currentInvidiousInstance } else { baseUrl = 'https://i.ytimg.com' diff --git a/src/renderer/components/ft-list-video/ft-list-video.vue b/src/renderer/components/ft-list-video/ft-list-video.vue index ac9dfa89d3a6d..f0d526af5fbc7 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.vue +++ b/src/renderer/components/ft-list-video/ft-list-video.vue @@ -23,7 +23,7 @@ :src="thumbnail" class="thumbnailImage" alt="" - :style="{filter: blurStyle}" + :style="{filter: thumbnailBlurStyle}" >
Date: Wed, 16 Aug 2023 11:13:48 +0200 Subject: [PATCH 07/13] Fix thumbnail display mode not applying to playlists Makes thumbnail display mode setting also affect thumbnails in ft-list-playlist and playlist-info. --- .../ft-list-playlist/ft-list-playlist.js | 20 +++++++++++++++++-- .../ft-list-playlist/ft-list-playlist.vue | 1 + .../ft-list-video/ft-list-video.scss | 4 ---- .../components/playlist-info/playlist-info.js | 11 ++++++++++ .../playlist-info/playlist-info.vue | 1 + src/renderer/scss-partials/_ft-list-item.scss | 1 + 6 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/renderer/components/ft-list-playlist/ft-list-playlist.js b/src/renderer/components/ft-list-playlist/ft-list-playlist.js index 5eb0532e5bc48..5ad26caae50d4 100644 --- a/src/renderer/components/ft-list-playlist/ft-list-playlist.js +++ b/src/renderer/components/ft-list-playlist/ft-list-playlist.js @@ -42,6 +42,14 @@ export default defineComponent({ defaultPlayback: function () { return this.$store.getters.getDefaultPlayback + }, + + thumbnailDisplayMode: function () { + return this.$store.getters.getThumbnailDisplayMode + }, + + thumbnailBlurStyle: function () { + return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : 'none' } }, created: function () { @@ -67,7 +75,11 @@ export default defineComponent({ parseInvidiousData: function () { this.title = this.data.title - this.thumbnail = this.data.playlistThumbnail.replace('https://i.ytimg.com', this.currentInvidiousInstance).replace('hqdefault', 'mqdefault') + if (this.thumbnailDisplayMode === 'hidden') { + this.thumbnail = require('../../assets/img/thumbnail_placeholder.png') + } else { + this.thumbnail = this.data.playlistThumbnail.replace('https://i.ytimg.com', this.currentInvidiousInstance).replace('hqdefault', 'mqdefault') + } this.channelName = this.data.author this.channelId = this.data.authorId this.playlistId = this.data.playlistId @@ -80,7 +92,11 @@ export default defineComponent({ parseLocalData: function () { this.title = this.data.title - this.thumbnail = this.data.thumbnail + if (this.thumbnailDisplayMode === 'hidden') { + this.thumbnail = require('../../assets/img/thumbnail_placeholder.png') + } else { + this.thumbnail = this.data.thumbnail + } this.channelName = this.data.channelName this.channelId = this.data.channelId this.playlistId = this.data.playlistId diff --git a/src/renderer/components/ft-list-playlist/ft-list-playlist.vue b/src/renderer/components/ft-list-playlist/ft-list-playlist.vue index 18906c84a7d51..037c0c9e9101e 100644 --- a/src/renderer/components/ft-list-playlist/ft-list-playlist.vue +++ b/src/renderer/components/ft-list-playlist/ft-list-playlist.vue @@ -15,6 +15,7 @@ alt="" :src="thumbnail" class="thumbnailImage" + :style="{filter: thumbnailBlurStyle}" >
diff --git a/src/renderer/scss-partials/_ft-list-item.scss b/src/renderer/scss-partials/_ft-list-item.scss index c3bb46f9adb78..731adf326faab 100644 --- a/src/renderer/scss-partials/_ft-list-item.scss +++ b/src/renderer/scss-partials/_ft-list-item.scss @@ -89,6 +89,7 @@ $watched-transition-duration: 0.5s; .thumbnailLink { display: flex; + overflow: hidden; } .thumbnailImage { From 5e185c430428a907fb5ed246ebc43a0912a244a0 Mon Sep 17 00:00:00 2001 From: David Frederick Batt <103059637+da-batt@users.noreply.github.com> Date: Wed, 16 Aug 2023 15:18:32 +0200 Subject: [PATCH 08/13] Remove unnecessary styling Co-authored-by: PikachuEXE --- src/renderer/components/ft-list-playlist/ft-list-playlist.js | 2 +- src/renderer/components/ft-list-video/ft-list-video.js | 2 +- src/renderer/components/playlist-info/playlist-info.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/ft-list-playlist/ft-list-playlist.js b/src/renderer/components/ft-list-playlist/ft-list-playlist.js index 5ad26caae50d4..646136a320509 100644 --- a/src/renderer/components/ft-list-playlist/ft-list-playlist.js +++ b/src/renderer/components/ft-list-playlist/ft-list-playlist.js @@ -49,7 +49,7 @@ export default defineComponent({ }, thumbnailBlurStyle: function () { - return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : 'none' + return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : null } }, created: function () { diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index 3c7a6b36f1cca..405374e3df63c 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -93,7 +93,7 @@ export default defineComponent({ }, thumbnailBlurStyle: function () { - return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : 'none' + return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : null }, backendPreference: function () { diff --git a/src/renderer/components/playlist-info/playlist-info.js b/src/renderer/components/playlist-info/playlist-info.js index 65735ae6112c6..7d46dd21f15a3 100644 --- a/src/renderer/components/playlist-info/playlist-info.js +++ b/src/renderer/components/playlist-info/playlist-info.js @@ -47,7 +47,7 @@ export default defineComponent({ }, thumbnailBlurStyle: function () { - return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : 'none' + return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : null }, backendPreference: function () { From e5c8402113c0ead077aed710afdf59bd26e93f8e Mon Sep 17 00:00:00 2001 From: david-frederick-batt Date: Thu, 17 Aug 2023 17:05:41 +0200 Subject: [PATCH 09/13] Make hidden thumbnails toggleable from thumbnail preferences --- .../distraction-settings.js | 25 ++++--------------- .../distraction-settings.vue | 12 ++++----- .../ft-list-playlist/ft-list-playlist.js | 12 ++++----- .../ft-list-playlist/ft-list-playlist.vue | 2 +- .../components/ft-list-video/ft-list-video.js | 10 ++++---- .../ft-list-video/ft-list-video.vue | 2 +- .../general-settings/general-settings.js | 6 +++-- .../components/playlist-info/playlist-info.js | 10 ++++---- .../playlist-info/playlist-info.vue | 2 +- src/renderer/store/modules/settings.js | 2 +- static/locales/en-US.yaml | 7 ++---- 11 files changed, 37 insertions(+), 53 deletions(-) diff --git a/src/renderer/components/distraction-settings/distraction-settings.js b/src/renderer/components/distraction-settings/distraction-settings.js index 0646df780a428..bb4d4810ce395 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.js +++ b/src/renderer/components/distraction-settings/distraction-settings.js @@ -4,7 +4,6 @@ import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue' import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue' import FtInputTags from '../../components/ft-input-tags/ft-input-tags.vue' import FtFlexBox from '../ft-flex-box/ft-flex-box.vue' -import FtSelect from '../ft-select/ft-select.vue' export default defineComponent({ name: 'PlayerSettings', @@ -13,16 +12,6 @@ export default defineComponent({ 'ft-toggle-switch': FtToggleSwitch, 'ft-input-tags': FtInputTags, 'ft-flex-box': FtFlexBox, - 'ft-select': FtSelect - }, - data: function () { - return { - thumbnailDisplayModeValues: [ - 'default', - 'hidden', - 'blurred' - ] - } }, computed: { hideVideoViews: function () { @@ -103,15 +92,11 @@ export default defineComponent({ showDistractionFreeTitles: function () { return this.$store.getters.getShowDistractionFreeTitles }, - thumbnailDisplayMode: function () { - return this.$store.getters.getThumbnailDisplayMode + thumbnailPreference: function () { + return this.$store.getters.getThumbnailPreference }, - thumbnailDisplayModeNames: function () { - return [ - this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Default'), - this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Hidden'), - this.$t('Settings.Distraction Free Settings.Thumbnail Display Mode.Blurred') - ] + blurThumbnails: function () { + return this.$store.getters.getBlurThumbnails }, channelsHidden: function () { return JSON.parse(this.$store.getters.getChannelsHidden) @@ -166,7 +151,7 @@ export default defineComponent({ 'updateHideSubscriptionsVideos', 'updateHideSubscriptionsShorts', 'updateHideSubscriptionsLive', - 'updateThumbnailDisplayMode' + 'updateBlurThumbnails' ]) } }) diff --git a/src/renderer/components/distraction-settings/distraction-settings.vue b/src/renderer/components/distraction-settings/distraction-settings.vue index 22f8f9b16d37f..fd0592f82bdab 100644 --- a/src/renderer/components/distraction-settings/distraction-settings.vue +++ b/src/renderer/components/distraction-settings/distraction-settings.vue @@ -193,12 +193,12 @@ :default-value="hideSharingActions" @change="updateHideSharingActions" /> -
diff --git a/src/renderer/components/ft-list-playlist/ft-list-playlist.js b/src/renderer/components/ft-list-playlist/ft-list-playlist.js index 646136a320509..3a1f486ff4ef0 100644 --- a/src/renderer/components/ft-list-playlist/ft-list-playlist.js +++ b/src/renderer/components/ft-list-playlist/ft-list-playlist.js @@ -44,12 +44,12 @@ export default defineComponent({ return this.$store.getters.getDefaultPlayback }, - thumbnailDisplayMode: function () { - return this.$store.getters.getThumbnailDisplayMode + blurThumbnails: function () { + return this.$store.getters.getBlurThumbnails }, - thumbnailBlurStyle: function () { - return this.thumbnailDisplayMode === 'blurred' ? 'blur(20px)' : null + blurThumbnailsStyle: function () { + return this.blurThumbnails ? 'blur(20px)' : null } }, created: function () { @@ -75,7 +75,7 @@ export default defineComponent({ parseInvidiousData: function () { this.title = this.data.title - if (this.thumbnailDisplayMode === 'hidden') { + if (this.thumbnailPreference === 'hidden') { this.thumbnail = require('../../assets/img/thumbnail_placeholder.png') } else { this.thumbnail = this.data.playlistThumbnail.replace('https://i.ytimg.com', this.currentInvidiousInstance).replace('hqdefault', 'mqdefault') @@ -92,7 +92,7 @@ export default defineComponent({ parseLocalData: function () { this.title = this.data.title - if (this.thumbnailDisplayMode === 'hidden') { + if (this.thumbnailPreference === 'hidden') { this.thumbnail = require('../../assets/img/thumbnail_placeholder.png') } else { this.thumbnail = this.data.thumbnail diff --git a/src/renderer/components/ft-list-playlist/ft-list-playlist.vue b/src/renderer/components/ft-list-playlist/ft-list-playlist.vue index 037c0c9e9101e..62891a6c351ac 100644 --- a/src/renderer/components/ft-list-playlist/ft-list-playlist.vue +++ b/src/renderer/components/ft-list-playlist/ft-list-playlist.vue @@ -15,7 +15,7 @@ alt="" :src="thumbnail" class="thumbnailImage" - :style="{filter: thumbnailBlurStyle}" + :style="{filter: blurThumbnailsStyle}" >
diff --git a/src/renderer/store/modules/settings.js b/src/renderer/store/modules/settings.js index c851183a664d8..e92c1070a68c7 100644 --- a/src/renderer/store/modules/settings.js +++ b/src/renderer/store/modules/settings.js @@ -272,7 +272,7 @@ const state = { skip: 'doNothing' }, thumbnailPreference: '', - thumbnailDisplayMode: 'default', + blurThumbnails: false, useProxy: false, useRssFeeds: false, useSponsorBlock: false, diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index 22682cdcde337..df4bef2b57078 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -166,6 +166,7 @@ Settings: Beginning: Beginning Middle: Middle End: End + Hidden: Hidden Current Invidious Instance: Current Invidious Instance The currently set default instance is {instance}: The currently set default instance is {instance} No default instance has been set: No default instance has been set @@ -332,6 +333,7 @@ Settings: Channel Page: Channel Page Watch Page: Watch Page General: General + Blur Thumbnails: Blur Thumbnails Hide Video Views: Hide Video Views Hide Video Likes And Dislikes: Hide Video Likes And Dislikes Hide Channel Subscribers: Hide Channel Subscribers @@ -360,11 +362,6 @@ Settings: Hide Subscriptions Videos: Hide Subscriptions Videos Hide Subscriptions Shorts: Hide Subscriptions Shorts Hide Subscriptions Live: Hide Subscriptions Live - Thumbnail Display Mode: - Thumbnail Display Mode: Thumbnail Display Mode - Default: Default - Hidden: Hidden - Blurred: Blurred Data Settings: Data Settings: Data Settings Select Import Type: Select Import Type From be249f2a59485c1a814ec23bf5d4b57367191838 Mon Sep 17 00:00:00 2001 From: david-frederick-batt Date: Fri, 18 Aug 2023 10:05:40 +0200 Subject: [PATCH 10/13] Replace thumbnail placeholder png with svg --- .../assets/img/thumbnail_placeholder.png | Bin 461859 -> 0 bytes .../assets/img/thumbnail_placeholder.svg | 1 + .../ft-list-playlist/ft-list-playlist.js | 4 ++-- .../components/ft-list-video/ft-list-video.js | 2 +- .../components/playlist-info/playlist-info.js | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 src/renderer/assets/img/thumbnail_placeholder.png create mode 100644 src/renderer/assets/img/thumbnail_placeholder.svg diff --git a/src/renderer/assets/img/thumbnail_placeholder.png b/src/renderer/assets/img/thumbnail_placeholder.png deleted file mode 100644 index 68f6b04c1577d17309f23e6a187c871f0926442d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 461859 zcmeI*ZLDQyRRG}kPCu9y&UBbg8>~kBQGf6UBdCpuF_cV|k=TeGNb!eCXf0?$$4;>o zdQG^d3AB*lFAan!O4NX9qERHqG_*)8!4TqCpuvPs%TT7F*Gh*9)Zry-&TyIOoOABp zXTKlMO4@tp+;iUju4kPeD`&5>_uGEy`k$X&dex;VrP<+^9s1>zHePb-_rKkL@u~m+ z-R&!|*?TJP+I!PmPyPFnqc3~)v6S|Gh+(1PBly(1U;m zu!kz|%<;$n=(it;S%95?^KSwK2oNAZpeq5*U{~dqECB)p2oNAZASDf;cL4zc1PBly zK%g@L4Pa*lmu~L@ue;`k_m~Cf{aqk`0t5)0DWDlVQ^W5B2oNAZfB=CG1T=sh6j_P{ z2oNAZfB=Cr1vG$X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uB6`rbA`{ zMn<+g0RjXFj4GfR9F^DN1PBlyK!5;&@&q)1<<-QF2oNAZfB*pkqY7vMN9DCR0Rqhm z-1y|ZkC_E%w!9J}(35~>u%~Lvl>h+(1PBlya7sV}=xsoN009C72oUH@Km*uW!KF)p z009EK6}aJpPaZW3uv{fE zYkN}{SWrQ1g#ZBp1PBl)Rp3QOKl-jVX8|;WrM~CvivR%v1PBlyFp_`Pa&mus8009C72s9(00c@s}5*b&sE*`{pY7nbTkWaE(VViAV7cs0Rn9cXa?J^uj~jAAV7cs z0RrDApaJ|o5)Tj{K!5-N0tDI?&;YhwU)ilBu=VMyA2bWF5}g+jAV7dXbpo2f>PlwA z1PBlyK!5;&-3e#_cjxET1PBlyK!5;&>I62P{e~z0Ko?kD-E5cufpG+0bmCP%XBJ=_ zTdNWvP_lq#u;l948vz0Y2oNAZU<3gT;0UOeBtU=w0RjXFlq{eDEV(-NMt}eT0_za? z%CBs^(=5O`q#dJ30nK2MWw9v&1PBlyK!Ct_0vf>aY^_Xy009C72oNYzKm%B0S!{{` z0RjXF5Lk!6EiZZ1gT2oJXa?8uPIC+b1PBlyK!89&0vf=AieW1R2oNAZfB=DY2xtJ; zq3jq02oNAZfB=Dl1T=uBit)}jJ-nULCF$^?YmXFE8(SejfB*pk1PF{S@bFLF^|2rN Vhdr{|{Beb>sj5 diff --git a/src/renderer/assets/img/thumbnail_placeholder.svg b/src/renderer/assets/img/thumbnail_placeholder.svg new file mode 100644 index 0000000000000..5057ad54615a1 --- /dev/null +++ b/src/renderer/assets/img/thumbnail_placeholder.svg @@ -0,0 +1 @@ + diff --git a/src/renderer/components/ft-list-playlist/ft-list-playlist.js b/src/renderer/components/ft-list-playlist/ft-list-playlist.js index 3a1f486ff4ef0..473f57a1676de 100644 --- a/src/renderer/components/ft-list-playlist/ft-list-playlist.js +++ b/src/renderer/components/ft-list-playlist/ft-list-playlist.js @@ -76,7 +76,7 @@ export default defineComponent({ parseInvidiousData: function () { this.title = this.data.title if (this.thumbnailPreference === 'hidden') { - this.thumbnail = require('../../assets/img/thumbnail_placeholder.png') + this.thumbnail = require('../../assets/img/thumbnail_placeholder.svg') } else { this.thumbnail = this.data.playlistThumbnail.replace('https://i.ytimg.com', this.currentInvidiousInstance).replace('hqdefault', 'mqdefault') } @@ -93,7 +93,7 @@ export default defineComponent({ parseLocalData: function () { this.title = this.data.title if (this.thumbnailPreference === 'hidden') { - this.thumbnail = require('../../assets/img/thumbnail_placeholder.png') + this.thumbnail = require('../../assets/img/thumbnail_placeholder.svg') } else { this.thumbnail = this.data.thumbnail } diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index 10b1fda603685..5bdde929ecc7e 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -234,7 +234,7 @@ export default defineComponent({ thumbnail: function () { if (this.thumbnailPreference === 'hidden') { - return require('../../assets/img/thumbnail_placeholder.png') + return require('../../assets/img/thumbnail_placeholder.svg') } let baseUrl if (this.backendPreference === 'invidious') { diff --git a/src/renderer/components/playlist-info/playlist-info.js b/src/renderer/components/playlist-info/playlist-info.js index 064199d9f4fe9..bf0447a1a425f 100644 --- a/src/renderer/components/playlist-info/playlist-info.js +++ b/src/renderer/components/playlist-info/playlist-info.js @@ -60,7 +60,7 @@ export default defineComponent({ thumbnail: function () { if (this.thumbnailPreference === 'hidden') { - return require('../../assets/img/thumbnail_placeholder.png') + return require('../../assets/img/thumbnail_placeholder.svg') } let baseUrl if (this.backendPreference === 'invidious') { From d778bdbcee9540a6b33eff26a85054848ec1e485 Mon Sep 17 00:00:00 2001 From: david-frederick-batt Date: Mon, 21 Aug 2023 09:26:54 +0200 Subject: [PATCH 11/13] Fix thumbnail preference 'hidden' not applying to ft-list-playlist --- src/renderer/components/ft-list-playlist/ft-list-playlist.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer/components/ft-list-playlist/ft-list-playlist.js b/src/renderer/components/ft-list-playlist/ft-list-playlist.js index 473f57a1676de..5258bd32bde04 100644 --- a/src/renderer/components/ft-list-playlist/ft-list-playlist.js +++ b/src/renderer/components/ft-list-playlist/ft-list-playlist.js @@ -50,6 +50,10 @@ export default defineComponent({ blurThumbnailsStyle: function () { return this.blurThumbnails ? 'blur(20px)' : null + }, + + thumbnailPreference: function () { + return this.$store.getters.getThumbnailPreference } }, created: function () { From 639d5b7129f2b0ad2cb83895d40848ddb04817b4 Mon Sep 17 00:00:00 2001 From: david-frederick-batt Date: Mon, 21 Aug 2023 10:10:28 +0200 Subject: [PATCH 12/13] Fix placeholder svg breaking playlist layout --- src/renderer/assets/img/thumbnail_placeholder.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/assets/img/thumbnail_placeholder.svg b/src/renderer/assets/img/thumbnail_placeholder.svg index 5057ad54615a1..aca0847aa3fd0 100644 --- a/src/renderer/assets/img/thumbnail_placeholder.svg +++ b/src/renderer/assets/img/thumbnail_placeholder.svg @@ -1 +1 @@ - + From a41f9f28d74803ed08faa3635e4629376ac1c69d Mon Sep 17 00:00:00 2001 From: david-frederick-batt Date: Mon, 21 Aug 2023 18:31:45 +0200 Subject: [PATCH 13/13] Refactor ft-list-video --- src/renderer/components/ft-list-video/ft-list-video.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index 5bdde929ecc7e..bfc0bb7d956df 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -233,9 +233,6 @@ export default defineComponent({ }, thumbnail: function () { - if (this.thumbnailPreference === 'hidden') { - return require('../../assets/img/thumbnail_placeholder.svg') - } let baseUrl if (this.backendPreference === 'invidious') { baseUrl = this.currentInvidiousInstance @@ -250,6 +247,8 @@ export default defineComponent({ return `${baseUrl}/vi/${this.id}/mq2.jpg` case 'end': return `${baseUrl}/vi/${this.id}/mq3.jpg` + case 'hidden': + return require('../../assets/img/thumbnail_placeholder.svg') default: return `${baseUrl}/vi/${this.id}/mqdefault.jpg` }