Adjusted v3 scrobble upgrade

This commit is contained in:
krateng 2022-04-07 06:09:07 +02:00
parent 6b4f2f713b
commit 74f6a931a4
1 changed files with 4 additions and 2 deletions

View File

@ -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
}