mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Added proper multi-artist scrobbling via API
This commit is contained in:
parent
723efcb8ba
commit
c86f3597fd
@ -214,17 +214,18 @@ def get_post_scrobble(artist:Multi,**keys):
|
|||||||
|
|
||||||
@api.post("newscrobble")
|
@api.post("newscrobble")
|
||||||
@authenticated_api_with_alternate(api_key_correct)
|
@authenticated_api_with_alternate(api_key_correct)
|
||||||
def post_scrobble(artist:Multi,**keys):
|
def post_scrobble(artist:Multi=None,**keys):
|
||||||
"""Submit a new scrobble.
|
"""Submit a new scrobble.
|
||||||
|
|
||||||
:param string artist: Artists. Can be multiple.
|
:param string artist: Artist. Can be submitted multiple times as query argument for multiple artists.
|
||||||
|
:param string artists: List of artists. Overwritten by artist parameter.
|
||||||
:param string title: Title of the track.
|
:param string title: Title of the track.
|
||||||
:param string album: Name of the album. Optional.
|
:param string album: Name of the album. Optional.
|
||||||
:param int duration: Actual listened duration of the scrobble in seconds. Optional.
|
:param int duration: Actual listened duration of the scrobble in seconds. Optional.
|
||||||
:param int time: UNIX timestamp of the scrobble. Optional, not needed if scrobble is at time of request.
|
:param int time: UNIX timestamp of the scrobble. Optional, not needed if scrobble is at time of request.
|
||||||
"""
|
"""
|
||||||
#artists = "/".join(artist)
|
#artists = "/".join(artist)
|
||||||
artists = artist
|
artists = artist if artist is not None else keys.get("artists")
|
||||||
title = keys.get("title")
|
title = keys.get("title")
|
||||||
album = keys.get("album")
|
album = keys.get("album")
|
||||||
duration = keys.get("seconds")
|
duration = keys.get("seconds")
|
||||||
|
Loading…
Reference in New Issue
Block a user