Account for tracks with nil length

This commit is contained in:
Claudio Ortolina
2025-05-05 16:18:33 +01:00
parent e1938f698c
commit 79d2bdff7b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ defmodule MusicBrainz.Release do
end
def medium_duration(medium) do
Enum.sum_by(medium.tracks, fn track -> track.length end)
Enum.sum_by(medium.tracks, fn track -> track.length || 0 end)
end
def from_api_response(r) do