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:
parent
0f39ecbf7e
commit
50cf592a75
@ -67,7 +67,7 @@ def upgrade_db(callback_add_scrobbles):
|
|||||||
scrobblelist = []
|
scrobblelist = []
|
||||||
log(f"\tImporting from {sf} ({idx}/{len(scrobblefiles)}) - {len(scrobbles)} Scrobbles")
|
log(f"\tImporting from {sf} ({idx}/{len(scrobblefiles)}) - {len(scrobbles)} Scrobbles")
|
||||||
for scrobble in 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 album in ('-',''): album = None
|
||||||
if duration in ('-',''): duration = None
|
if duration in ('-',''): duration = None
|
||||||
scrobblelist.append({
|
scrobblelist.append({
|
||||||
|
Loading…
Reference in New Issue
Block a user