mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Compare commits
3 Commits
28d43d00cb
...
6601920f69
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6601920f69 | ||
![]() |
5b8e2debbc | ||
![]() |
b255d424ee |
|
@ -320,7 +320,8 @@ def post_scrobble(
|
||||||
length:int=None,
|
length:int=None,
|
||||||
time:int=None,
|
time:int=None,
|
||||||
nofix=None,
|
nofix=None,
|
||||||
auth_result=None):
|
auth_result=None,
|
||||||
|
**extra_kwargs):
|
||||||
"""Submit a new scrobble.
|
"""Submit a new scrobble.
|
||||||
|
|
||||||
:param string artist: Artist. Can be submitted multiple times as query argument for multiple artists.
|
:param string artist: Artist. Can be submitted multiple times as query argument for multiple artists.
|
||||||
|
@ -358,15 +359,22 @@ def post_scrobble(
|
||||||
)
|
)
|
||||||
|
|
||||||
if result:
|
if result:
|
||||||
return {
|
response = {
|
||||||
'status': 'success',
|
'status': 'success',
|
||||||
'track': {
|
'track': {
|
||||||
'artists':result['track']['artists'],
|
'artists':result['track']['artists'],
|
||||||
'title':result['track']['title']
|
'title':result['track']['title']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if extra_kwargs:
|
||||||
|
response['warnings'] = [
|
||||||
|
{'type':'invalid_keyword_ignored','value':k}
|
||||||
|
for k in extra_kwargs
|
||||||
|
]
|
||||||
else:
|
else:
|
||||||
return {"status":"failure"}
|
response = {"status":"failure"}
|
||||||
|
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ full = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
maloja = "maloja:main"
|
maloja = "maloja.__main__:main"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["flit_core >=3.2,<4"]
|
requires = ["flit_core >=3.2,<4"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user