Overview page
Met klassiek onbruikbare interface dit jaar.
This commit is contained in:
@@ -26,6 +26,10 @@ class Track(models.Model):
|
||||
def name_sanitized(self):
|
||||
return re.match("[^\-\(]*\w", self.name)[0]
|
||||
|
||||
@property
|
||||
def link(self):
|
||||
return f'https://open.spotify.com/track/{self.id}'
|
||||
|
||||
def is_duplicate_of(self):
|
||||
tracks = Track.objects.exclude(id=self.id).filter(name__startswith=self.name_sanitized)
|
||||
artists = [artist.name for artist in self.artists.all()]
|
||||
|
||||
Reference in New Issue
Block a user