mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Send albuminfo_received only in metadata_plugins.py
This commit is contained in:
parent
2b69e4fc3d
commit
5ff1c7b17f
2 changed files with 4 additions and 5 deletions
|
|
@ -317,9 +317,6 @@ def tag_album(
|
|||
for matched_candidate in metadata_plugins.candidates(
|
||||
items, search_artist, search_album, va_likely
|
||||
):
|
||||
plugins.send(
|
||||
"albuminfo_received", info=matched_candidate, items=items
|
||||
)
|
||||
_add_candidate(items, candidates, matched_candidate)
|
||||
if opt_candidate := candidates.get(matched_candidate.album_id):
|
||||
plugins.send("album_matched", match=opt_candidate)
|
||||
|
|
|
|||
|
|
@ -35,10 +35,12 @@ def find_metadata_source_plugins() -> list[MetadataSourcePlugin]:
|
|||
return [p for p in find_plugins() if hasattr(p, "data_source")] # type: ignore[misc]
|
||||
|
||||
|
||||
def candidates(*args, **kwargs) -> Iterable[AlbumInfo]:
|
||||
def candidates(items, *args, **kwargs) -> Iterable[AlbumInfo]:
|
||||
"""Return matching album candidates from all metadata source plugins."""
|
||||
for plugin in find_metadata_source_plugins():
|
||||
yield from plugin.candidates(*args, **kwargs)
|
||||
for info in plugin.candidates(items, *args, **kwargs):
|
||||
send("albuminfo_received", info=info, items=items)
|
||||
yield info
|
||||
|
||||
|
||||
@notify_info_yielded("trackinfo_received")
|
||||
|
|
|
|||
Loading…
Reference in a new issue