diff --git a/beetsplug/listenbrainz.py b/beetsplug/listenbrainz.py index 11ef715977..3127237eea 100644 --- a/beetsplug/listenbrainz.py +++ b/beetsplug/listenbrainz.py @@ -150,6 +150,7 @@ def get_playlists_createdfor(self, username): def get_listenbrainz_playlists(self): """Returns a list of playlists created by ListenBrainz.""" import re + resp = self.get_playlists_createdfor(self.username) playlists = resp.get("playlists") listenbrainz_playlists = [] @@ -158,7 +159,9 @@ def get_listenbrainz_playlists(self): playlist_info = playlist.get("playlist") if playlist_info.get("creator") == "listenbrainz": title = playlist_info.get("title") - match = re.search(r"(Missed Recordings of \d{4}|Discoveries of \d{4})", title) + match = re.search( + r"(Missed Recordings of \d{4}|Discoveries of \d{4})", title + ) if "Exploration" in title: playlist_type = "Exploration" elif "Jams" in title: @@ -178,7 +181,7 @@ def get_listenbrainz_playlists(self): id = identifier.split("/")[-1] if playlist_type in ["Jams", "Exploration"]: listenbrainz_playlists.append( - {"type": playlist_type, "date": date, "identifier": id} + {"type": playlist_type, "date": date, "identifier": id} ) return listenbrainz_playlists