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

Fixed major bug

This commit is contained in:
Krateng 2018-12-21 17:22:44 +01:00
parent e0ec4b3137
commit 1e346f7d0e

View File

@ -502,9 +502,9 @@ def rebuild():
# Starts the server # Starts the server
def runserver(PORT): def runserver(PORT):
global lastsync global lastsync
lastsync = time = int(datetime.datetime.now(tz=datetime.timezone.utc).timestamp()) lastsync = int(datetime.datetime.now(tz=datetime.timezone.utc).timestamp())
build_db() build_db()
coa.updateIDs(ARTISTS)
loadAPIkeys() loadAPIkeys()
@ -522,6 +522,8 @@ def build_db():
ARTISTS = [] ARTISTS = []
TRACKS = [] TRACKS = []
db = parseAllTSV("scrobbles","int","string","string") db = parseAllTSV("scrobbles","int","string","string")
for sc in db: for sc in db:
artists = sc[1].split("") artists = sc[1].split("")
@ -550,6 +552,8 @@ def build_db():
# readScrobble(artists,title,time) # readScrobble(artists,title,time)
SCROBBLES.sort(key = lambda tup: tup[1]) SCROBBLES.sort(key = lambda tup: tup[1])
coa.updateIDs(ARTISTS)
global db_rulestate global db_rulestate
db_rulestate = consistentRulestate("scrobbles",cla.checksums) db_rulestate = consistentRulestate("scrobbles",cla.checksums)