1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Adjusted v3 scrobble upgrade

This commit is contained in:
krateng 2022-04-07 06:09:07 +02:00
parent 6b4f2f713b
commit 74f6a931a4

View File

@ -39,7 +39,9 @@ def upgrade_db(callback_add_scrobbles):
if re.match(r"[0-9]+_[0-9]+\.tsv",sf): if re.match(r"[0-9]+_[0-9]+\.tsv",sf):
origin = 'legacy' origin = 'legacy'
elif sf == "lastfmimport.tsv": elif sf == "lastfmimport.tsv":
origin = 'lastfm-import' origin = 'import:lastfm'
elif sf == "spotifyimport.tsv":
origin = 'import:spotify'
else: else:
origin = 'unknown' origin = 'unknown'
@ -61,7 +63,7 @@ def upgrade_db(callback_add_scrobbles):
"duration":duration, "duration":duration,
"origin":origin, "origin":origin,
"extra":{ "extra":{
"album":album "album_name":album
# saving this in the scrobble instead of the track because for now it's not meant # 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 # to be authorative information, just payload of the scrobble
} }