Ignore:
Timestamp:
2016-07-08T20:05:46+02:00 (8 years ago)
Author:
simon04
Message:

JOSM/wikipedia: fetch labels in chunks of 50 – #josm13122

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java

    r32611 r32614  
    103103                }
    104104                if ("wikidata".equals(wikipediaLang)) {
    105                     final Map<String, String> labels = getLabelForWikidata(names, Locale.getDefault());
     105                    final Map<String, String> labels = new HashMap<>();
     106                    for (final List<String> chunk : partitionList(names, 50)) {
     107                        labels.putAll(getLabelForWikidata(chunk, Locale.getDefault()));
     108                    }
    106109                    final List<WikipediaEntry> entriesWithLabel = new ArrayList<>(nodes.getLength());
    107110                    for (WikipediaEntry entry : entries) {
Note: See TracChangeset for help on using the changeset viewer.