Update recommended video section to use hide videos from channel preference (#3749)

* * Update recommended video section to use hide videos from channel preference

* * Update setting tooltip text

* Update `or` to `and`

* * Update most popular view to use hide videos from channel preference
This commit is contained in:
PikachuEXE
2023-07-12 20:09:28 -04:00
committed by GitHub
parent 930184d29d
commit 325b36ea01
5 changed files with 22 additions and 4 deletions
@@ -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
@@ -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
}
}
@@ -22,6 +22,7 @@
:data="video"
appearance="recommendation"
force-list-type="list"
:use-channels-hidden-preference="true"
/>
</ft-card>
</template>
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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