From ced04c02ec684d0ea55acb913bebd543f5c043b7 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 23 Jul 2013 01:22:59 +0200 Subject: [PATCH] Update voice files downloader --- .../osmand/plus/download/DownloadOsmandIndexesHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java index 3d8adfec28..685af77045 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java @@ -89,9 +89,9 @@ public class DownloadOsmandIndexesHelper { for (String key : mapping.keySet()) { String target = mapping.get(key); if (target.endsWith("-tts/_ttsconfig.p") && target.startsWith("voice/")) { - String voice = target.substring("voice/".length(), target.length() - "-tts/_ttsconfig.p".length()); + String voice = target.substring("voice/".length(), target.length() - "/_ttsconfig.p".length()); File destFile = new File(voicePath, voice + File.separatorChar + "_ttsconfig.p"); - result.add(new AssetIndexItem(key, "voice", date, dateModified, "0.1", "", key, destFile.getPath())); + result.add(new AssetIndexItem(voice +ext, "voice", date, dateModified, "0.1", "", key, destFile.getPath())); } else if (target.endsWith("/_config.p") && target.startsWith("voice/")) { String voice = target.substring("voice/".length(), target.length() - "/_config.p".length()); IndexItem item = result.getIndexFilesByName(key); @@ -106,7 +106,7 @@ public class DownloadOsmandIndexesHelper { log.error("Parse exception", es); } item.date = date; - item.attachedItem = new AssetIndexItem(key, "voice", date, dateModified, "0.1", "", key, destFile.getPath()); + item.attachedItem = new AssetIndexItem(voice +extvoice, "voice", date, dateModified, "0.1", "", key, destFile.getPath()); } } }