Made ogg voice guidance backward-compatible

This commit is contained in:
PaulStets 2018-08-10 16:43:46 +03:00
parent e67a7d20f9
commit 1f5430d9a5
3 changed files with 6 additions and 3 deletions

View file

@ -43,6 +43,7 @@ import net.osmand.plus.helpers.GpxUiHelper;
import net.osmand.plus.routing.RouteProvider;
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.views.MapControlsLayer;
import net.osmand.plus.voice.MediaCommandPlayerImpl;
import net.osmand.router.GeneralRouter;
import net.osmand.router.GeneralRouter.RoutingParameter;
import net.osmand.util.Algorithms;
@ -339,7 +340,7 @@ public class RoutePreferencesMenu {
if (extStorage.exists()) {
for (File f : extStorage.listFiles()) {
if (f.isDirectory()) {
if (addJS && hasJavaScript(f)) {
if ((addJS && hasJavaScript(f)) || MediaCommandPlayerImpl.isMyData(f)) {
setFiles.add(f.getName());
} else if (!addJS) {
setFiles.add(f.getName());

View file

@ -90,6 +90,9 @@ public class JSMediaCommandPlayerImpl extends MediaCommandPlayerImpl {
}
public static boolean isMyData(File voiceDir) {
if (voiceDir.getName().contains("tts")) {
return false;
}
for (File f : voiceDir.listFiles()) {
if (f.getName().endsWith(IndexConstants.TTSVOICE_INDEX_EXT_JS)) {
return true;

View file

@ -323,8 +323,7 @@ public class JSTTSCommandPlayerImpl extends AbstractJSCommandPlayer {
}
public static boolean isMyData(File voiceDir) {
boolean isTTS = voiceDir.getName().contains("tts");
if (!isTTS) {
if (!voiceDir.getName().contains("tts")) {
return false;
}
for (File f : voiceDir.listFiles()) {