diff --git a/beets/plugins.py b/beets/plugins.py index 26e70ed72..25452560a 100644 --- a/beets/plugins.py +++ b/beets/plugins.py @@ -239,12 +239,7 @@ class BeetsPlugin: return Distance() def candidates( - self, - items: list[Item], - artist: str, - album: str, - va_likely: bool, - extra_tags: dict[str, Any] | None = None, + self, items: list[Item], artist: str, album: str, va_likely: bool ) -> Iterator[AlbumInfo]: """Return :py:class:`AlbumInfo` candidates that match the given album. @@ -252,9 +247,6 @@ class BeetsPlugin: :param artist: Album artist :param album: Album name :param va_likely: Whether the album is likely to be by various artists - :param extra_tags: is a an optional dictionary of extra tags to search. - Only relevant to :py:class:`MusicBrainzPlugin` autotagger and can be - ignored by other plugins """ yield from () @@ -872,12 +864,7 @@ class MetadataSourcePlugin(Generic[R], BeetsPlugin, metaclass=abc.ABCMeta): return extract_release_id(self.data_source.lower(), id_string) def candidates( - self, - items: list[Item], - artist: str, - album: str, - va_likely: bool, - extra_tags: dict[str, Any] | None = None, + self, items: list[Item], artist: str, album: str, va_likely: bool ) -> Iterator[AlbumInfo]: query_filters = {"album": album} if not va_likely: diff --git a/beets/test/helper.py b/beets/test/helper.py index 66b4ddb71..a24836e84 100644 --- a/beets/test/helper.py +++ b/beets/test/helper.py @@ -806,7 +806,7 @@ class AutotagStub: for p in self.patchers: p.stop() - def candidates(self, items, artist, album, va_likely, extra_tags=None): + def candidates(self, items, artist, album, va_likely): if self.matching == self.IDENT: yield self._make_album_match(artist, album, len(items)) diff --git a/beetsplug/beatport.py b/beetsplug/beatport.py index d98fab722..20147b5cc 100644 --- a/beetsplug/beatport.py +++ b/beetsplug/beatport.py @@ -361,7 +361,7 @@ class BeatportPlugin(BeetsPlugin): data_source=self.data_source, info=track_info, config=self.config ) - def candidates(self, items, artist, release, va_likely, extra_tags=None): + def candidates(self, items, artist, release, va_likely): """Returns a list of AlbumInfo objects for beatport search results matching release and artist (if not various). """ diff --git a/beetsplug/chroma.py b/beetsplug/chroma.py index 08fb97f59..518a41776 100644 --- a/beetsplug/chroma.py +++ b/beetsplug/chroma.py @@ -200,7 +200,7 @@ class AcoustidPlugin(plugins.BeetsPlugin): dist.add_expr("track_id", info.track_id not in recording_ids) return dist - def candidates(self, items, artist, album, va_likely, extra_tags=None): + def candidates(self, items, artist, album, va_likely): albums = [] for relid in prefix(_all_releases(items), MAX_RELEASES): album = self.mb.album_for_id(relid) diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index a8d08c1e9..1852f300f 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -156,7 +156,7 @@ class DiscogsPlugin(BeetsPlugin): data_source="Discogs", info=track_info, config=self.config ) - def candidates(self, items, artist, album, va_likely, extra_tags=None): + def candidates(self, items, artist, album, va_likely): """Returns a list of AlbumInfo objects for discogs search results matching an album and artist (if not various). """ diff --git a/docs/changelog.rst b/docs/changelog.rst index a01ee8c97..3370f5396 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -26,6 +26,10 @@ Bug fixes: For packagers: +* Optional ``extra_tags`` parameter has been removed from + ``BeetsPlugin.candidates`` method signature since it is never passed in. If + you override this method in your plugin, feel free to remove this parameter. + Other changes: 2.3.1 (May 14, 2025)