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

Updated database rebuild, should fix GH-16

This commit is contained in:
Krateng 2020-06-18 15:16:24 +02:00
parent 4c6b40e42f
commit 57403a89ab
2 changed files with 7 additions and 1 deletions

View File

@ -5,7 +5,7 @@ author = {
"email":"maloja@krateng.dev",
"github": "krateng"
}
version = 2,4,12
version = 2,4,13
versionstr = ".".join(str(n) for n in version)
links = {
"pypi":"malojaserver",

View File

@ -933,6 +933,7 @@ def build_db():
log("Building database...")
global SCROBBLES, ARTISTS, TRACKS
global TRACKS_NORMALIZED_SET, TRACKS_NORMALIZED, ARTISTS_NORMALIZED_SET, ARTISTS_NORMALIZED
global SCROBBLESDICT, STAMPS
SCROBBLES = []
@ -941,6 +942,11 @@ def build_db():
STAMPS = []
SCROBBLESDICT = {}
TRACKS_NORMALIZED = []
ARTISTS_NORMALIZED = []
ARTISTS_NORMALIZED_SET = set()
TRACKS_NORMALIZED_SET = set()
# parse files
db = tsv.parse_all(datadir("scrobbles"),"int","string","string",comments=False)