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:
parent
0fdd7669cc
commit
87cdb9987e
@ -5,7 +5,7 @@ author = {
|
||||
"email":"maloja@krateng.dev",
|
||||
"github": "krateng"
|
||||
}
|
||||
version = 2,6,5
|
||||
version = 2,6,6
|
||||
versionstr = ".".join(str(n) for n in version)
|
||||
links = {
|
||||
"pypi":"malojaserver",
|
||||
|
@ -44,11 +44,7 @@ def handler(apiname,version):
|
||||
return deco
|
||||
|
||||
def handle(path,keys):
|
||||
print("API request: " + str(path))
|
||||
print("Keys:")
|
||||
for k in keys:
|
||||
print("\t",k,":",keys.get(k))
|
||||
|
||||
log("API request: " + str(path))# + " | Keys: " + str({k:keys.get(k) for k in keys}))
|
||||
|
||||
if len(path)>1 and (path[0],path[1]) in handlers:
|
||||
handler = handlers[(path[0],path[1])]
|
||||
@ -63,7 +59,7 @@ def handle(path,keys):
|
||||
response.status = 500
|
||||
|
||||
|
||||
print("Response: " + str(result))
|
||||
log("Response: " + str(result))
|
||||
return result
|
||||
|
||||
def scrobbletrack(artiststr,titlestr,timestamp):
|
||||
@ -182,7 +178,6 @@ class LBrnz1(APIHandler):
|
||||
}
|
||||
|
||||
def get_method(self,pathnodes,keys):
|
||||
print(pathnodes)
|
||||
return pathnodes.pop(0)
|
||||
|
||||
def submit(self,pathnodes,keys):
|
||||
|
5
maloja/data_files/rules/predefined/krateng_cpop.tsv
Normal file
5
maloja/data_files/rules/predefined/krateng_cpop.tsv
Normal 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.
|
@ -717,12 +717,6 @@ def sapi(path:Multi,**keys):
|
||||
|
||||
|
||||
|
||||
|
||||
@dbserver.get("sync")
|
||||
def abouttoshutdown():
|
||||
sync()
|
||||
#sys.exit()
|
||||
|
||||
@dbserver.post("newrule")
|
||||
def newrule(**keys):
|
||||
apikey = keys.pop("key",None)
|
||||
|
Loading…
Reference in New Issue
Block a user