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

search: exclude "Single"/"EP" text from album artist list #698

Merged

Conversation

sgvictorino
Copy link
Contributor

 next(r for r in yt.search("Eminem Houdini", filter="albums") if r["title"] == "Houdini")["artists"]

 [
-    {'name': 'Single', 'id': None},
     {'name': 'Eminem', 'id': 'UCedvOgsKFzcK3hA5taf3KoQ'}
 ]

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.08%. Comparing base (b86654f) to head (c3dd26a).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #698   +/-   ##
=======================================
  Coverage   95.07%   95.08%           
=======================================
  Files          40       40           
  Lines        2357     2360    +3     
=======================================
+ Hits         2241     2244    +3     
  Misses        116      116           
Flag Coverage Δ
unittests 95.08% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sigma67
Copy link
Owner

sigma67 commented Dec 22, 2024

This is fine but the translations are incomplete.

It's fairly easy to retrieve the correct values automatically by looping over the YTMusic instance with the different language values and printing the single/ep value. Then add it to the po files. Keep in mind that they need to be compiled, see locales/README.

Please also add tests.

@sgvictorino sgvictorino force-pushed the album-artists-exclude-release-type-text branch 2 times, most recently from 0732f0f to 7e9e95c Compare December 22, 2024 20:11
```diff
 next(r for r in yt.search("Eminem Houdini", filter="albums") if r["title"] == "Houdini")["artists"]

 [
-    {'name': 'Single', 'id': None},
     {'name': 'Eminem', 'id': 'UCedvOgsKFzcK3hA5taf3KoQ'}
 ]
```
@sgvictorino sgvictorino force-pushed the album-artists-exclude-release-type-text branch from 7e9e95c to c3dd26a Compare December 22, 2024 20:32
@sigma67 sigma67 self-requested a review December 27, 2024 17:25
Copy link
Owner

@sigma67 sigma67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@sigma67 sigma67 merged commit 338d63c into sigma67:main Dec 27, 2024
5 checks passed
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