beets icon indicating copy to clipboard operation
beets copied to clipboard

Change missing plugin to allow for filtering albums by release type

Open bgrassy opened this issue 1 year ago • 0 comments

Description

Addresses #2661.

Currently, the missing plugin when ran in album mode only allows for getting all release groups attached to a single artist. Users may want to restrict this search to only show releases of a specific type (such as albums or compilations). This CR adds a new --release-type flag to the missing plugin. If users want to filter to a specific type (or set of types), they simply need to provide this flag for every release type that they want included.

As part of this change, the default behavior has been shifted to only select album type releases as is suggested in the issue- to avoid breaking default behavior I could easily switch this back. I am also wondering if it might make sense to address the following idea (https://github.com/beetbox/beets/discussions/5101) in a follow-up.

The tests I wrote are written using pytest, as it is suggested in the documentation to stay away from unittest. As a result, I required a slightly different mixin inheritance schema than is usually seen. If there are any other recommended ways to accomplish this I'd be happy to switch!

To Do

  • [x] Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • [x] Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • [x] Tests. (Very much encouraged but not strictly required.)

bgrassy avatar Jan 11 '25 04:01 bgrassy