From c86f3597fd80f4e0eba6a6b8985d49a2211a88ba Mon Sep 17 00:00:00 2001 From: Krateng Date: Sun, 10 Jan 2021 15:30:11 +0100 Subject: [PATCH] Added proper multi-artist scrobbling via API --- maloja/apis/native_v1.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maloja/apis/native_v1.py b/maloja/apis/native_v1.py index bb21bfa..5fa05e6 100644 --- a/maloja/apis/native_v1.py +++ b/maloja/apis/native_v1.py @@ -214,17 +214,18 @@ def get_post_scrobble(artist:Multi,**keys): @api.post("newscrobble") @authenticated_api_with_alternate(api_key_correct) -def post_scrobble(artist:Multi,**keys): +def post_scrobble(artist:Multi=None,**keys): """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 album: Name of the album. 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. """ #artists = "/".join(artist) - artists = artist + artists = artist if artist is not None else keys.get("artists") title = keys.get("title") album = keys.get("album") duration = keys.get("seconds")