Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for the "verified" badge when looking for streams on youtube #1366

Merged
merged 1 commit into from
Jan 2, 2023

Conversation

rutviklhase
Copy link
Contributor

  • Added a new value called "verifiedChannelScore" inside the "heuristics.ts" file.
  • Added the newly created value to the "mean( )" function.

The verified channels now have a significant weight while deciding what tracks to recommend on top of the list.

@rutviklhase
Copy link
Contributor Author

@nukeop Please let me know if there's anything missing! This is my first time contributing. I've also excluded the package-lock.json file.

@nukeop nukeop added the under review This pull request is being reviewed by maintainers. label Nov 13, 2022
@nukeop
Copy link
Owner

nukeop commented Nov 13, 2022

Thanks, the code looks ok. Could you please add a test for this case? There is a bunch of similar tests already so it should be pretty easy. The setup should probably include a couple of videos with identical titles and authors, while one of them is marked as verified.

@codecov
Copy link

codecov bot commented Nov 13, 2022

Codecov Report

Base: 70.07% // Head: 70.07% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (8920a34) compared to base (8988bad).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1366   +/-   ##
=======================================
  Coverage   70.07%   70.07%           
=======================================
  Files         358      358           
  Lines        6639     6640    +1     
  Branches      465      466    +1     
=======================================
+ Hits         4652     4653    +1     
  Misses       1597     1597           
  Partials      390      390           
Impacted Files Coverage Δ
packages/core/src/rest/heuristics.ts 76.00% <100.00%> (+1.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rutviklhase
Copy link
Contributor Author

Thanks, the code looks ok. Could you please add a test for this case? There is a bunch of similar tests already so it should be pretty easy. The setup should probably include a couple of videos with identical titles and authors, while one of them is marked as verified.

@nukeop Yes absolutely! Thank you so much for the feedback.

@rutviklhase
Copy link
Contributor Author

rutviklhase commented Nov 14, 2022

Hey @nukeop !
I actually needed just a little bit of help with setting up the test.
I dont think I completely understand where exactly heuristics actually make an impact. From what I can understand, the changes in heuritics have an imapact on the order in which the Livestreams appear, am I correct?

For instance :
Here's a search result with const verifiedChannelScore = track.author.verified ? 200 : 0;.
image

And here's a search result with const verifiedChannelScore = track.author.verified ? 0 : 0;.
image

The order does seem to have changed slightly.
Is this the desired effect we're looking to have?

@rutviklhase
Copy link
Contributor Author

@nukeop Hey! Could you please take a look at the screenshots I've posted above? Would love to know what you think!

@nukeop nukeop merged commit e4154fc into nukeop:master Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
under review This pull request is being reviewed by maintainers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants