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

Compare commits

...

3 Commits

Author SHA1 Message Date
krateng
6601920f69 Fixed entrypoint 2022-04-16 02:17:43 +02:00
krateng
5b8e2debbc Merge branch 'master' into feature-restructure 2022-04-16 02:04:04 +02:00
krateng
b255d424ee Native API accepts superfluous keywords, FoxxMD/multi-scrobbler#42 2022-04-15 17:49:13 +02:00
2 changed files with 12 additions and 4 deletions

View File

@ -320,7 +320,8 @@ def post_scrobble(
length:int=None,
time:int=None,
nofix=None,
auth_result=None):
auth_result=None,
**extra_kwargs):
"""Submit a new scrobble.
:param string artist: Artist. Can be submitted multiple times as query argument for multiple artists.
@ -358,15 +359,22 @@ def post_scrobble(
)
if result:
return {
response = {
'status': 'success',
'track': {
'artists':result['track']['artists'],
'title':result['track']['title']
}
}
if extra_kwargs:
response['warnings'] = [
{'type':'invalid_keyword_ignored','value':k}
for k in extra_kwargs
]
else:
return {"status":"failure"}
response = {"status":"failure"}
return response

View File

@ -40,7 +40,7 @@ full = [
]
[project.scripts]
maloja = "maloja:main"
maloja = "maloja.__main__:main"
[build-system]
requires = ["flit_core >=3.2,<4"]