| 37 | size_t i; |
| 38 | json_t* tagJ; |
| 39 | json_array_foreach(tagsJ, i, tagJ) { |
| 40 | std::string tag = json_string_value(tagJ); |
| 41 | int tagId = tag::findId(tag); |
| 42 | if (tagId < 0) { |
| 43 | // WARN("Module %s/%s has invalid tag \"%s\"", plugin->slug.c_str(), slug.c_str(), tag.c_str()); |
| 44 | continue; |
| 45 | } |
| 46 | |
| 47 | // Omit duplicates |
| 48 | auto it = std::find(tagIds.begin(), tagIds.end(), tagId); |
| 49 | if (it != tagIds.end()) { |
| 50 | // WARN("Module %s/%s has duplicate tag \"%s\"", plugin->slug.c_str(), slug.c_str(), tag.c_str()); |
| 51 | continue; |
| 52 | } |
| 53 | |
| 54 | tagIds.push_back(tagId); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // manualUrl |