summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJean Felder <jfelder@src.gnome.org>2020-05-22 22:07:50 +0200
committerVictor Toso <me@victortoso.com>2020-07-22 18:29:20 +0000
commit5c6c955969df5fad5e475ad305196564bf44b2c1 (patch)
treeca569496e8e921ea4dfac5b3187827edd8c909a7 /tests
parent3025a1fde12f92de16ee74694910c4ef9ba20490 (diff)
downloadgrilo-plugins-5c6c955969df5fad5e475ad305196564bf44b2c1.tar.gz
grl-acoustid: Do not return the same recording multiple times
An AcoustID lookup operation can return multiple results. Each of these results can contain multiple MusicBrainz recordings. However, a result can contain recordings that are also part of an other result. As a grilo query operation returns each of these recordings, it means that the same recording can be returned multiple times. In other words, a query operation can return duplicates. Fix the issue by storing the recordings that have already been found and checking that a result does not contain recordings that have already been returned.
Diffstat (limited to 'tests')
-rw-r--r--tests/lua-factory/sources/test_lua_acoustid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/lua-factory/sources/test_lua_acoustid.c b/tests/lua-factory/sources/test_lua_acoustid.c
index 263e005..bafde83 100644
--- a/tests/lua-factory/sources/test_lua_acoustid.c
+++ b/tests/lua-factory/sources/test_lua_acoustid.c
@@ -82,7 +82,7 @@ test_query_by_fingerprint (void)
options,
&error);
g_assert_no_error (error);
- g_assert_cmpint (g_list_length (results), ==, 12);
+ g_assert_cmpint (g_list_length (results), ==, 8);
media = GRL_MEDIA (results->data);
g_assert_cmpstr (grl_media_get_title (media), ==, "Primavera");