Skip to content

Commit

Permalink
Merge pull request #38 from rat4/master
Browse files Browse the repository at this point in the history
lyrics-vagalume: Ignore approximate results
  • Loading branch information
sahib committed Sep 6, 2013
2 parents 523f5b1 + 2954d99 commit 72f2def
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/intern/lyrics/vagalume.c
Expand Up @@ -123,14 +123,12 @@ static gboolean found_song (const char *json, jsmntok_t *tokens, int *cur_token,
continue;
}
if (found_key) {
if (len == 13 && g_ascii_strncasecmp(text_start, "song_notfound", len) == 0) {
/* song not found! */
if (len == 5 && g_ascii_strncasecmp(text_start, "exact", len) == 0) {
song_found = true;
break;
} else {
/* FIXME the only other "type" I've seen is "exact",
* don't know if there are any others. Maybe log the
* value if it is not "exact"? */
song_found = true;
/* other types are notfound, song_notfound and aprox
* aprox results can be crazy, let's ignore them */
break;
}
}
Expand Down

0 comments on commit 72f2def

Please sign in to comment.