-
Notifications
You must be signed in to change notification settings - Fork 2k
Add Media Field for Album #6152
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Hi Grace! Thanks for the PR and your interest in contributing to Beets! We currently have the If there's a use case that isn't addressed by the current implementation, more context & background for the issues this addresses would be appreciated! Thanks! |
|
Hi @henry-oberholtzer, I created the original issue. The context here is when you run certain queries at album level, $media is not provided as it is not an album level field. For example, running |
|
@endcredits33 indeed, because |
|
@endcredits33 @gcoppola19 Ah, I see! I missed that. I could see the album level query returning a list of the distinct media types from its tracks? I assume we never have albums without at least one Item. |
Is this a common occurence? I think generally most releases tend to have a single media type. At the moment we're not displaying media at all for albums just because some releases may contain several types. |
|
I think we need to be able to account for those instances, even if they're rare, and it should be possible to through DB queries. |
|
@henry-oberholtzer @endcredits33 Can I work on implementing this? Where for an album, it would list all media types of the songs in the album? |
|
I don't see the value of doing this. Have you tried album_fields? |
|
Couldn't we make the same argument about other fields, e.g label, genre, catalog number? These can vary across the same release (anecdotally more often than media) and yet they are included as album level fields. |
|
I wanted to implement it so that if a user wants to see the media types of songs in an album, it lists all the types, and made test cases to test if there was one media type, none, or multiple. Let me know if it needs any chances in functionality, I hope it's helpful! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6152 +/- ##
==========================================
+ Coverage 67.93% 67.94% +0.01%
==========================================
Files 137 137
Lines 18677 18683 +6
Branches 3155 3157 +2
==========================================
+ Hits 12688 12694 +6
Misses 5324 5324
Partials 665 665
🚀 New features to boost your workflow:
|
Fixes 6092
Add a media field for album, when a user runs beets fields, media will be listed for album. This way, media of album can be kept track of.
Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
[x ] Tests.
test_media_field.py