Update listenbrainz.py

This commit is contained in:
Alok Saboo 2023-12-19 14:57:44 -05:00
parent 2c25076fbf
commit 619fb17383

View file

@ -71,11 +71,8 @@ class ListenBrainzPlugin(BeetsPlugin):
A ValueError if the JSON in the response is invalid.
An IndexError if the JSON is not structured as expected.
"""
response = self._make_request(
url="http://{0}/1/user/{1}/listens".format(
self.ROOT, self.username
),
)
url = f"{self.ROOT}/user/{self.username}/listens"
response = self._make_request(url)
if response is not None:
return response["payload"]["listens"]