Fixed issues with js voice deletion

This commit is contained in:
PaulStets 2018-08-08 10:21:35 +03:00
parent 00420753cf
commit 3b64f67c97
2 changed files with 1 additions and 6 deletions

View file

@ -139,10 +139,6 @@ public class IndexItem implements Comparable<IndexItem> {
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();
}

View file

@ -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;
}