From f361edc812e99017d12c468bc2d2f639264f00b7 Mon Sep 17 00:00:00 2001 From: PaulStets Date: Wed, 15 Aug 2018 11:25:12 +0300 Subject: [PATCH] Fixed an issue with double locale languages and added several tts languages --- OsmAnd/assets/bundled_assets.xml | 4 ++-- .../net/osmand/plus/download/DownloadOsmandIndexesHelper.java | 2 +- OsmAnd/src/net/osmand/plus/voice/AbstractJSCommandPlayer.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/assets/bundled_assets.xml b/OsmAnd/assets/bundled_assets.xml index 53650d3a66..db65f15936 100644 --- a/OsmAnd/assets/bundled_assets.xml +++ b/OsmAnd/assets/bundled_assets.xml @@ -47,11 +47,11 @@ - + - + diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java index b90c28631a..93dcd8fce5 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java @@ -166,7 +166,7 @@ public class DownloadOsmandIndexesHelper { result.add(new AssetIndexItem(voice + ext, "voice", date, dateModified, "0.1", destFile.length(), key, destFile.getPath(), DownloadActivityType.VOICE_FILE)); } else if (target.endsWith(IndexConstants.TTSVOICE_INDEX_EXT_JS) && target.startsWith("voice/")) { - String lang = target.substring("voice/".length(), target.indexOf("-")); + String lang = target.substring("voice/".length(), target.indexOf("-tts")); File destFile = new File(voicePath, target.substring("voice/".length(), target.indexOf("/", "voice/".length())) + "/" + lang + "_tts.js"); result.add(new AssetIndexItem(lang + "_" + IndexConstants.TTSVOICE_INDEX_EXT_JS, diff --git a/OsmAnd/src/net/osmand/plus/voice/AbstractJSCommandPlayer.java b/OsmAnd/src/net/osmand/plus/voice/AbstractJSCommandPlayer.java index 84a2e0b04d..01a1454eff 100644 --- a/OsmAnd/src/net/osmand/plus/voice/AbstractJSCommandPlayer.java +++ b/OsmAnd/src/net/osmand/plus/voice/AbstractJSCommandPlayer.java @@ -42,7 +42,7 @@ public abstract class AbstractJSCommandPlayer implements CommandPlayer, StateCha log.info("Initializing prolog system : " + (System.currentTimeMillis() - time)); //$NON-NLS-1$ } this.streamType = ctx.getSettings().AUDIO_STREAM_GUIDANCE.getModeValue(applicationMode); - language = voiceProvider.substring(0, voiceProvider.indexOf("-")); + language = voiceProvider.substring(0, voiceProvider.indexOf("-tts")); } @Override