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

Improved some logging

This commit is contained in:
Krateng 2020-08-05 15:45:52 +02:00
parent 0fdd7669cc
commit 87cdb9987e
4 changed files with 8 additions and 14 deletions

View File

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

View File

@ -44,11 +44,7 @@ def handler(apiname,version):
return deco return deco
def handle(path,keys): def handle(path,keys):
print("API request: " + str(path)) log("API request: " + str(path))# + " | Keys: " + str({k:keys.get(k) for k in keys}))
print("Keys:")
for k in keys:
print("\t",k,":",keys.get(k))
if len(path)>1 and (path[0],path[1]) in handlers: if len(path)>1 and (path[0],path[1]) in handlers:
handler = handlers[(path[0],path[1])] handler = handlers[(path[0],path[1])]
@ -63,7 +59,7 @@ def handle(path,keys):
response.status = 500 response.status = 500
print("Response: " + str(result)) log("Response: " + str(result))
return result return result
def scrobbletrack(artiststr,titlestr,timestamp): def scrobbletrack(artiststr,titlestr,timestamp):
@ -182,7 +178,6 @@ class LBrnz1(APIHandler):
} }
def get_method(self,pathnodes,keys): def get_method(self,pathnodes,keys):
print(pathnodes)
return pathnodes.pop(0) return pathnodes.pop(0)
def submit(self,pathnodes,keys): def submit(self,pathnodes,keys):

View File

@ -0,0 +1,5 @@
# NAME: Artists and Groups
# DESC: Combines artists that also performed as part of a group
replaceartist SING女團 S.I.N.G.
replacetitle SING-Moonlight Thoughts Moonlight Thoughts (English Version)
Can't render this file because it has a wrong number of fields in line 4.

View File

@ -717,12 +717,6 @@ def sapi(path:Multi,**keys):
@dbserver.get("sync")
def abouttoshutdown():
sync()
#sys.exit()
@dbserver.post("newrule") @dbserver.post("newrule")
def newrule(**keys): def newrule(**keys):
apikey = keys.pop("key",None) apikey = keys.pop("key",None)