diff --git a/OsmAnd/src/net/osmand/plus/download/IndexItem.java b/OsmAnd/src/net/osmand/plus/download/IndexItem.java index 0c43ca4cb8..4334ef28f1 100644 --- a/OsmAnd/src/net/osmand/plus/download/IndexItem.java +++ b/OsmAnd/src/net/osmand/plus/download/IndexItem.java @@ -139,10 +139,6 @@ public class IndexItem implements Comparable { String basename; if (type == DownloadActivityType.HILLSHADE_FILE) { basename = (FileNameTranslationHelper.HILL_SHADE + getBasename()).replace("_", " "); - } else if (type == DownloadActivityType.VOICE_FILE && getFileName().endsWith(IndexConstants.TTSVOICE_INDEX_EXT_JS)){ - return new File(type.getDownloadFolder(ctx, this), - getBasename().replaceAll("[_\\.]+", "-") + File.separator + getBasename().replaceFirst("-", "_") - .replace('-', '.')); } else { basename = getBasename(); } diff --git a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java index 190ede5b32..11b4ba1452 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java @@ -19,7 +19,6 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; -import net.osmand.IndexConstants; import net.osmand.map.WorldRegion; import net.osmand.plus.R; import net.osmand.plus.Version; @@ -403,7 +402,7 @@ public class ItemViewHolder { } else if (indexItem.getType() == DownloadActivityType.FONT_FILE) { tp = LocalIndexType.FONT_DATA; } else if (indexItem.getType() == DownloadActivityType.VOICE_FILE) { - tp = indexItem.getFileName().contains("-tts-js") ? LocalIndexType.TTS_VOICE_DATA_JS : + tp = indexItem.getBasename().contains("-tts-js") ? LocalIndexType.TTS_VOICE_DATA_JS : indexItem.getBasename().contains("tts") ? LocalIndexType.TTS_VOICE_DATA : LocalIndexType.VOICE_DATA; }