diff --git a/api/funkwhale_api/contrib/scrobbler/scrobbler.py b/api/funkwhale_api/contrib/scrobbler/scrobbler.py index f5a7ddd3f..2d18ee778 100644 --- a/api/funkwhale_api/contrib/scrobbler/scrobbler.py +++ b/api/funkwhale_api/contrib/scrobbler/scrobbler.py @@ -90,7 +90,7 @@ def get_scrobble_payload(track, date, suffix="[0]"): "l{}".format(suffix): upload.duration if upload else 0, "b{}".format(suffix): (track.album.title if track.album else "") or "", "n{}".format(suffix): track.position or "", - "m{}".format(suffix): str(track.mbid) or "", + "m{}".format(suffix): str(track.mbid or ""), "o{}".format(suffix): "P", # Source: P = chosen by user } if date: @@ -115,7 +115,7 @@ def get_scrobble2_payload(track, date, suffix="[0]"): if track.position: data["trackNumber"] = track.position if track.mbid: - data["mbid"] = str(track.mbid) + data["mbid"] = str(track.mbid or "") if date: offset = upload.duration / 2 if upload.duration else 0 data["timestamp"] = int(int(date.timestamp()) - offset) diff --git a/changes/changelog.d/1498.bug b/changes/changelog.d/1498.bug new file mode 100644 index 000000000..5290c9e2a --- /dev/null +++ b/changes/changelog.d/1498.bug @@ -0,0 +1 @@ +Fix the scrobbler plugin submitting literal "None" as MusicBrainz ID (#1498)