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

Fixed upgrading early scrobbles, GH-106

This commit is contained in:
krateng 2022-04-12 17:57:13 +02:00
parent 0f39ecbf7e
commit 50cf592a75

View File

@ -67,7 +67,7 @@ def upgrade_db(callback_add_scrobbles):
scrobblelist = []
log(f"\tImporting from {sf} ({idx}/{len(scrobblefiles)}) - {len(scrobbles)} Scrobbles")
for scrobble in scrobbles:
timestamp, artists, title, album, duration = scrobble
timestamp, artists, title, album, duration, *_ = scrobble + [None,None]
if album in ('-',''): album = None
if duration in ('-',''): duration = None
scrobblelist.append({