Edited changelog and fixed an issue with plugin loading.

This commit is contained in:
Sebastian Mohr 2025-07-09 10:33:52 +02:00
parent 04f0339172
commit 5cd6a39a01
2 changed files with 4 additions and 2 deletions

View file

@ -23,6 +23,7 @@ import sys
import traceback
from collections import defaultdict
from functools import wraps
from types import GenericAlias
from typing import TYPE_CHECKING, Any, Callable, Sequence, TypeVar
import mediafile
@ -298,6 +299,7 @@ def load_plugins(names: Sequence[str] = ()) -> None:
for obj in getattr(namespace, name).__dict__.values():
if (
inspect.isclass(obj)
and not isinstance(obj, GenericAlias)
and issubclass(obj, BeetsPlugin)
and obj != BeetsPlugin
and not inspect.isabstract(obj)

View file

@ -72,8 +72,8 @@ For plugin developers:
#. :class:`beets.metadata_plugin.MetadataSourcePlugin`
allows plugins to act like metadata sources. E.g. used by the MusicBrainz plugin. All plugins
in the beets repo are opted into this class where applicable. If you are maintaining a plugin
that acts like a metadata source, i.e. you expose any of `track_for_id,
album_for_id, candidates, item_candidates, album_distance, track_distance` methods,
that acts like a metadata source, i.e. you expose any of ``track_for_id``,
``album_for_id``, ``candidates``, ``item_candidates``, ``album_distance``, ``track_distance`` methods,
please update your plugin to inherit from the new baseclass, as otherwise it will
not be registered as a metadata source and wont be usable going forward.