From 8920a349a14e5f7c309f1223928fc05f2dfba177 Mon Sep 17 00:00:00 2001 From: rutviklhase Date: Sat, 12 Nov 2022 19:23:58 +0530 Subject: [PATCH] Added verifiedChannelScore value inside heuristics --- packages/core/src/rest/heuristics.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/rest/heuristics.ts b/packages/core/src/rest/heuristics.ts index 570297c599..1632f89180 100644 --- a/packages/core/src/rest/heuristics.ts +++ b/packages/core/src/rest/heuristics.ts @@ -67,6 +67,7 @@ export class YoutubeHeuristics implements SearchHeuristics> { } const channelNameScore = track.author.name.toLowerCase().includes(artist.toLowerCase()) ? 200 : 0; + const verifiedChannelScore = track.author.verified ? 200 : 0; return mean([ titleScore, @@ -75,7 +76,8 @@ export class YoutubeHeuristics implements SearchHeuristics> { promotedWordsScore, penalizedWordsScore, liveVideoScore, - channelNameScore + channelNameScore, + verifiedChannelScore ]); };