mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 11:22:25 +00:00
Add explore feed pipeline
This commit is contained in:
1 parent
bb96aabdae
commit
c3aa42f39c
5 files changed
+336
-32
No files matched your search
@@ -275,8 +275,10 @@ export function createResolvePostedAtStage({
|
||||
|
||||
export function createTagPreferenceFilterStage({
|
||||
stageName = "tag-preference-filter",
|
||||
matchInterests = true,
|
||||
} = {}) {
|
||||
return async function tagPreferenceFilterStage(items = [], context = {}) {
|
||||
const shouldMatchInterests = matchInterests !== false;
|
||||
const tagPreferences = context?.runtime?.tagPreferences;
|
||||
const interests = normalizeTagSet(tagPreferences?.interests);
|
||||
const disinterests = normalizeTagSet(tagPreferences?.disinterests);
|
||||
@@ -340,7 +342,7 @@ export function createTagPreferenceFilterStage({
|
||||
let matchedInterests = [];
|
||||
if (interests.size) {
|
||||
matchedInterests = [...videoTags].filter((tag) => interests.has(tag));
|
||||
if (matchedInterests.length === 0) {
|
||||
if (shouldMatchInterests && matchedInterests.length === 0) {
|
||||
context?.addWhy?.({
|
||||
stage: stageName,
|
||||
type: "filter",
|
||||
|
||||
Reference in new issue
Block a user