Export listening history to csv (#57)

Still need to convert timestamps to more CPU-readable format and figure
out what to do about reading headers for importing.
This commit is contained in:
2018-11-06 22:58:38 -05:00
parent 3d6dff359d
commit fa2c5f7008
6 changed files with 37 additions and 23 deletions

View File

@@ -106,6 +106,9 @@ class History(models.Model):
def get_track_name(self):
return self.track.name
def get_track_id(self):
return self.track.id
def get_artists(self):
artist_names = [artist.name for artist in self.track.artists.all()]
return ', '.join(artist_names)