diff --git a/src/helpers.cpp b/src/helpers.cpp index fda0d38..c70ed92 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -221,15 +221,22 @@ namespace mb else { json medias = release.value("media", json::array()); + size_t total_tracks = 0; + bool added = false; for (auto& media : medias) { size_t track_count = media.value("track-count", 0U); + total_tracks += track_count; if (track_count == count) { out.add_item(id); + added = true; break; } } + if (!added && total_tracks == count) { + out.add_item(id); + } } } }