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

Fixed db fixing with new file structure

This commit is contained in:
Krateng 2020-04-21 18:20:40 +02:00
parent b17060184b
commit afe01c8341
2 changed files with 11 additions and 3 deletions

View File

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

View File

@ -9,7 +9,15 @@ from .backup import backup
wendigo = CleanerAgent()
exp = r"([0-9]*)(\t+)([^\t]+?)(\t+)([^\t]+)(\t*)([^\t]*)\n"
exp = r"([0-9]*)(\t+)([^\t]+?)(\t+)([^\t]+)([^\n]*)\n"
# 1 2 3 4 5 6
# groups:
# 1 - timestamp
# 2 - sep
# 3 - artists
# 4 - sep
# 5 - title
# 6 - rest
@ -38,7 +46,7 @@ def fix():
for l in oldfile:
a,t = re.sub(exp,r"\3",l), re.sub(exp,r"\5",l)
r1,r2,r3 = re.sub(exp,r"\1\2",l),re.sub(exp,r"\4",l),re.sub(exp,r"\6\7",l)
r1,r2,r3 = re.sub(exp,r"\1\2",l),re.sub(exp,r"\4",l),re.sub(exp,r"\6",l)
a = a.replace("",";")