adds track loading example
This commit is contained in:
1 parent
7c92b33f91
commit
31c6fd3265
7 files changed
+81
-22
No files matched your search
@@ -104,6 +104,11 @@ class Track(models.Model):
|
||||
artists = list(map(lambda a:a.name, self.artists.all()))
|
||||
return " & ".join(artists)
|
||||
|
||||
@property
|
||||
def album_cover(self):
|
||||
if self.album:
|
||||
return self.album.image_url
|
||||
|
||||
@property
|
||||
def name_sanitized(self):
|
||||
return re.match("[^\-\(]*\w", self.name)[0]
|
||||
|
||||
Reference in new issue
Block a user