diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java index 56d137a696..53521fc5ab 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java @@ -40,22 +40,22 @@ public class DownloadResources extends DownloadResourceGroup { private Map indexFileNames = new LinkedHashMap<>(); private Map indexActivatedFileNames = new LinkedHashMap<>(); private List rawResources; - private Map > groupByRegion; + private Map> groupByRegion; private List itemsToUpdate = new ArrayList<>(); public static final String WORLD_SEAMARKS_KEY = "world_seamarks"; public static final String WORLD_SEAMARKS_NAME = "World_seamarks"; public static final String WORLD_SEAMARKS_OLD_KEY = "world_seamarks_basemap"; public static final String WORLD_SEAMARKS_OLD_NAME = "World_seamarks_basemap"; + public static final String WIKIVOYAGE_FILE_FILTER = "wikivoyage"; private static final Log LOG = PlatformUtil.getLog(DownloadResources.class); - - + public DownloadResources(OsmandApplication app) { super(null, DownloadResourceGroupType.WORLD, ""); this.region = app.getRegions().getWorldRegion(); this.app = app; } - + public List getItemsToUpdate() { return itemsToUpdate; } @@ -365,7 +365,9 @@ public class DownloadResources extends DownloadResourceGroup { continue; } if (ii.getType() == DownloadActivityType.TRAVEL_FILE) { - wikivoyageMaps.addItem(ii); + if (ii.getFileName().contains(WIKIVOYAGE_FILE_FILTER)) { + wikivoyageMaps.addItem(ii); + } continue; } String basename = ii.getBasename().toLowerCase(); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java index 7255694422..b8dab7434a 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java @@ -46,6 +46,7 @@ import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; +import static net.osmand.plus.download.DownloadResources.WIKIVOYAGE_FILE_FILTER; import static net.osmand.plus.wikivoyage.explore.WikivoyageExploreActivity.*; public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadEvents, TravelLocalDataHelper.Listener { @@ -403,7 +404,9 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadEv List allWikivoyageItems = app.getDownloadThread().getIndexes().getWikivoyageItems(); if (allWikivoyageItems != null) { for (IndexItem item : allWikivoyageItems) { - if (!item.isDownloaded() && !mainItems.contains(item)) { + if (!item.isDownloaded() + && !mainItems.contains(item) + && item.getFileName().contains(WIKIVOYAGE_FILE_FILTER)) { mainItems.add(item); } }