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

[Feature] Track Matching #1382

Merged
merged 6 commits into from
Jan 3, 2023
Merged

Conversation

Demizo
Copy link
Contributor

@Demizo Demizo commented Jan 2, 2023

Improved Youtube heuristics to make playing the correct track more consistent

@nukeop
Copy link
Owner

nukeop commented Jan 2, 2023

Could you please reset package-lock.json for this PR so that the diff is smaller?

@nukeop nukeop force-pushed the feature-trackmatching branch from a170288 to 175d27d Compare January 2, 2023 20:44
@nukeop
Copy link
Owner

nukeop commented Jan 2, 2023

I'm gonna start writing tests now. There are 2 worrying failures:

  • Searching for artist: 'Nick Cave & The Bad Seeds', title: 'The Mercy Seat', it selects Johnny Cash - The Mercy Seat over Nick Cave - The Mercy Seat, all other things being equal
  • Searching for artist: 'The White Stripes', title: 'Seven Nation Army', it prefers The Whte Stipes - Sevn Natn Ary over The Whte Stripes - Sevn Nation Army.

I'm gonna see if I can fix these test cases while still preserving your new rules.

@nukeop
Copy link
Owner

nukeop commented Jan 2, 2023

Ok, I added back the title score but weighed it lower, so that it only decides if all else is very similar. Otherwise looks like all of your changes are weight adjustments, so they're covered by existing tests and don't need to be covered again. Would you like to merge this now?

@codecov
Copy link

codecov bot commented Jan 2, 2023

Codecov Report

Base: 70.71% // Head: 70.71% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (8dec1d6) compared to base (e4154fc).
Patch coverage: 33.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1382      +/-   ##
==========================================
- Coverage   70.71%   70.71%   -0.01%     
==========================================
  Files         360      360              
  Lines        6588     6590       +2     
  Branches      456      456              
==========================================
+ Hits         4659     4660       +1     
- Misses       1551     1553       +2     
+ Partials      378      377       -1     
Impacted Files Coverage Δ
packages/core/src/rest/Youtube.ts 31.76% <0.00%> (-0.77%) ⬇️
packages/core/src/rest/heuristics.ts 80.00% <60.00%> (+4.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.

@Demizo
Copy link
Contributor Author

Demizo commented Jan 2, 2023

I'll test it quick. I have a playlist of varied music I was validating against (it had a few songs that didn't play nicely with title score so I will see if the new weights work)

@Demizo
Copy link
Contributor Author

Demizo commented Jan 2, 2023

I didn't see any major issues with the title score added back at low weight (only a few music videos where it would have previously been the official track). Should I leave in the hacks for preventing undefined tracks?

@nukeop
Copy link
Owner

nukeop commented Jan 2, 2023

Sure, it will stop being a problem when ytdl-core is updated, but it can stay until then.

@Demizo
Copy link
Contributor Author

Demizo commented Jan 2, 2023

Sounds good! Thanks for all the help!

@Demizo Demizo marked this pull request as ready for review January 2, 2023 23:37
@nukeop nukeop merged commit 95cfe0e into nukeop:master Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants