adds track loading example

This commit is contained in:
2025-07-19 19:53:24 +02:00
parent 7c92b33f91
commit 31c6fd3265
7 changed files with 81 additions and 22 deletions
+5
View File
@@ -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]