From 74f6a931a4a7fbfb2b75696cec671e29c4588f86 Mon Sep 17 00:00:00 2001 From: krateng Date: Thu, 7 Apr 2022 06:09:07 +0200 Subject: [PATCH] Adjusted v3 scrobble upgrade --- maloja/upgrade.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/maloja/upgrade.py b/maloja/upgrade.py index df7c487..991f5c6 100644 --- a/maloja/upgrade.py +++ b/maloja/upgrade.py @@ -39,7 +39,9 @@ def upgrade_db(callback_add_scrobbles): if re.match(r"[0-9]+_[0-9]+\.tsv",sf): origin = 'legacy' elif sf == "lastfmimport.tsv": - origin = 'lastfm-import' + origin = 'import:lastfm' + elif sf == "spotifyimport.tsv": + origin = 'import:spotify' else: origin = 'unknown' @@ -61,7 +63,7 @@ def upgrade_db(callback_add_scrobbles): "duration":duration, "origin":origin, "extra":{ - "album":album + "album_name":album # saving this in the scrobble instead of the track because for now it's not meant # to be authorative information, just payload of the scrobble }