We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b33d6de commit 570bb75Copy full SHA for 570bb75
1 file changed
beetsplug/lastgenre/client.py
@@ -74,15 +74,8 @@ def fetch_genres(
74
self, obj: pylast.Album | pylast.Artist | pylast.Track
75
) -> list[str]:
76
"""Return genres for a pylast entity."""
77
- # Work around an inconsistency in pylast where
78
- # Album.get_top_tags() does not return TopItem instances.
79
- # https://github.com/pylast/pylast/issues/86
80
- obj_to_query: Any = obj
81
- if isinstance(obj, pylast.Album):
82
- obj_to_query = super(pylast.Album, obj)
83
-
84
try:
85
- res: Any = obj_to_query.get_top_tags()
+ res = obj.get_top_tags()
86
except PYLAST_EXCEPTIONS as exc:
87
self._log.debug("last.fm error: {}", exc)
88
return []
0 commit comments