If we already have the album, return early

This commit is contained in:
Hugo 2020-06-01 21:45:11 +03:00
parent aae4bb3693
commit d467e2ceb7

View file

@ -2128,6 +2128,8 @@ class Track(_Opus):
def get_album(self):
"""Returns the album object of this track."""
if "album" in self.info and self.info["album"] is not None:
return Album(self.artist, self.info["album"], self.network)
doc = self._request(self.ws_prefix + ".getInfo", True)