Commit e28c0811 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

careless access to track.image would cause exception in the Tidal plugin

parent 43dc9e47
......@@ -117,8 +117,9 @@ def trackentries(httphp, pathprefix, objid, tracks):
posixpath.join(pathprefix,
'track?version=1&trackId=%s' % track.id)
li['tp'] = 'it'
if track.image:
li['upnp:albumArtURI'] = track.image
image = getattr(track, 'image', None)
if image:
li['upnp:albumArtURI'] = image
if track.album:
li['upnp:album'] = track.album.name
if not track.image and track.album.image:
......
......@@ -48,6 +48,7 @@ class Album(Model):
num_tracks = -1
duration = -1
release_date = None
image = None
@property
def image(self, width=512, height=512):
......@@ -89,6 +90,7 @@ class Track(Model):
artists = []
album = None
available = True
image = None
class SearchResult(Model):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment