diff --git a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js index 392f208b72680..fd35850be4b66 100644 --- a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js +++ b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js @@ -59,7 +59,7 @@ export default defineComponent({ if (!data.type) { return false } - if (data.type === 'video') { + if (data.type === 'video' || data.type === 'shortVideo') { if (this.hideLiveStreams && (data.liveNow || data.lengthSeconds == null)) { // hide livestreams return false diff --git a/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.js b/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.js index 2ac01ba81357a..c255110b4b3a8 100644 --- a/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.js +++ b/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.js @@ -43,18 +43,35 @@ export default defineComponent({ type: Boolean, default: false, }, + useChannelsHiddenPreference: { + type: Boolean, + default: false, + }, }, data: function () { return { visible: false } }, + computed: { + channelsHidden() { + // Some component users like channel view will have this disabled + if (!this.useChannelsHiddenPreference) { return [] } + + return JSON.parse(this.$store.getters.getChannelsHidden) + }, + + shouldBeVisible() { + return !(this.channelsHidden.includes(this.data.authorId) || + this.channelsHidden.includes(this.data.author)) + } + }, created() { this.visible = this.initialVisibleState }, methods: { onVisibilityChanged: function (visible) { - if (visible) { + if (visible && this.shouldBeVisible) { this.visible = visible } } diff --git a/src/renderer/components/watch-video-recommendations/watch-video-recommendations.vue b/src/renderer/components/watch-video-recommendations/watch-video-recommendations.vue index a8b8dd87b6561..7bd4cf0d7bc96 100644 --- a/src/renderer/components/watch-video-recommendations/watch-video-recommendations.vue +++ b/src/renderer/components/watch-video-recommendations/watch-video-recommendations.vue @@ -22,6 +22,7 @@ :data="video" appearance="recommendation" force-list-type="list" + :use-channels-hidden-preference="true" /> diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index 33f7bc84d2db9..4336e38839978 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -829,7 +829,7 @@ Tooltips: you want to be passed to the external player. DefaultCustomArgumentsTemplate: "(Default: '{defaultCustomArguments}')" Distraction Free Settings: - Hide Channels: Enter a channel name or channel ID to hide all videos, playlists and the channel itself from appearing in search or trending. + Hide Channels: Enter a channel name or channel ID to hide all videos, playlists and the channel itself from appearing in search, trending, most popular and recommended. The channel name entered must be a complete match and is case sensitive. Subscription Settings: Fetch Feeds from RSS: When enabled, FreeTube will use RSS instead of its default diff --git a/static/locales/en_GB.yaml b/static/locales/en_GB.yaml index fde53b8863cd5..da691b8fe4e2d 100644 --- a/static/locales/en_GB.yaml +++ b/static/locales/en_GB.yaml @@ -918,7 +918,7 @@ Tooltips: in-memory image cache. Will lead to increased RAM usage. Distraction Free Settings: Hide Channels: Enter a channel name or channel ID to hide all videos, playlists - and the channel itself from appearing in search or trending. The channel name + and the channel itself from appearing in search, trending, most popular and recommended. The channel name entered must be a complete match and is case sensitive. Playing Next Video Interval: Playing next video in no time. Click to cancel. | Playing next video in {nextVideoInterval} second. Click to cancel. | Playing next video