Commit 41ffff9a authored by Agate's avatar Agate 💬

Merge branch 'null-position-federation' into 'master'

Fixed a crash when federating a track with unspecified position

See merge request !652
parents 34293668 f73c7714
Pipeline #3478 passed with stages
in 4 minutes and 41 seconds
......@@ -273,7 +273,7 @@ def federation_audio_track_to_metadata(payload):
new_data = {
"title": payload["name"],
"album": payload["album"]["name"],
"track_number": payload["position"],
"track_number": payload.get("position") or 1,
"disc_number": payload.get("disc"),
"artist": payload["artists"][0]["name"],
"album_artist": payload["album"]["artists"][0]["name"],
......
Fixed a crash when federating a track with unspecified position
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment