Skip to content

Commit

Permalink
Merge pull request #1366 from rutviklhase/feature/verified-channels
Browse files Browse the repository at this point in the history
Look for the "verified" badge when looking for streams on youtube
  • Loading branch information
nukeop authored Jan 2, 2023
2 parents e8fcb68 + 8920a34 commit e4154fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/rest/heuristics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export class YoutubeHeuristics implements SearchHeuristics<Partial<Video>> {
}

const channelNameScore = track.author.name.toLowerCase().includes(artist.toLowerCase()) ? 200 : 0;
const verifiedChannelScore = track.author.verified ? 200 : 0;

return mean([
titleScore,
Expand All @@ -75,7 +76,8 @@ export class YoutubeHeuristics implements SearchHeuristics<Partial<Video>> {
promotedWordsScore,
penalizedWordsScore,
liveVideoScore,
channelNameScore
channelNameScore,
verifiedChannelScore
]);
};

Expand Down

0 comments on commit e4154fc

Please sign in to comment.