- if (0 == strncmp(c->title, data, strlen(data)))
- nums |= 1 << c->title_count;
+
+ if (c->title_count == 1) {
+ if (!strcmp(c->title, data))
+ nums |= 1 << c->title_count;
+ } else {
+ size_t len;
+ gchar *end;
+
+ /* find the beginning of our " - [%u]", this relies on
+ that syntax being used */
+ end = strrchr(c->title, '-') - 1;
+ len = end - c->title;
+ if (!strncmp(c->title, data, len))
+ nums |= 1 << c->title_count;
+ }