Skip to content

Commit 570bb75

Browse files
committed
Remove special handling for pylast.Album.get_top_tags
This issue has been resolved in 2014.
1 parent b33d6de commit 570bb75

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

beetsplug/lastgenre/client.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,8 @@ def fetch_genres(
7474
self, obj: pylast.Album | pylast.Artist | pylast.Track
7575
) -> list[str]:
7676
"""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-
8477
try:
85-
res: Any = obj_to_query.get_top_tags()
78+
res = obj.get_top_tags()
8679
except PYLAST_EXCEPTIONS as exc:
8780
self._log.debug("last.fm error: {}", exc)
8881
return []

0 commit comments

Comments
 (0)