From b63ec6b15f4cc1a0dcdd35abee941752273f9b89 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 6 Feb 2023 19:31:25 -0500 Subject: [PATCH] Fix bug in export when artist does not exist --- vrobbler/apps/scrobbles/export.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/export.py b/vrobbler/apps/scrobbles/export.py index 5795760..f27f34b 100644 --- a/vrobbler/apps/scrobbles/export.py +++ b/vrobbler/apps/scrobbles/export.py @@ -52,8 +52,9 @@ def export_scrobbles(start_date=None, end_date=None, format="AS"): track = scrobble.track track_number = 0 # TODO Add track number track_rating = "S" # TODO implement ratings? + track_artist = track.artist or track.album.primary_artist row = [ - track.album.primary_artist.name, + track_artist, track.album.name, track.title, track_number,