Skip to content

Commit

Permalink
Properly handle relative artwork_url generated by certain plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
rajlaud committed Oct 22, 2020
1 parent e9f4238 commit 3fb8f25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pysqueezebox/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ def image_url(self):
"""Return image url of current playing media."""
if self.current_track and "artwork_url" in self.current_track:
# we're playing a remote stream with an artwork url
return self.current_track["artwork_url"]
artwork_url = self.current_track["artwork_url"]
# some plugins generate a relative artwork_url
if not artwork_url.startswith("http"):
artwork_url = self._lms.generate_image_url(artwork_url)
return artwork_url
if self.current_track and "coverid" in self.current_track:
return self._lms.generate_image_url_from_track_id(
self.current_track["coverid"]
Expand Down

0 comments on commit 3fb8f25

Please sign in to comment.