Add parameter to check live
This commit is contained in:
parent
8ad8288865
commit
c6f3f7afda
1 changed files with 7 additions and 1 deletions
|
@ -233,8 +233,14 @@ public class DownloadActivityType {
|
|||
}
|
||||
|
||||
public String getBaseUrl(OsmandApplication ctx, String fileName) {
|
||||
return "http://" + IndexConstants.INDEX_DOWNLOAD_DOMAIN + "/download?event=2&"
|
||||
String url = "http://" + IndexConstants.INDEX_DOWNLOAD_DOMAIN + "/download?event=2&"
|
||||
+ Version.getVersionAsURLParam(ctx) + "&file=" + encode(fileName);
|
||||
if(this == LIVE_UPDATES_FILE && fileName.length() > 16) {
|
||||
// DATE_AND_EXT_STR_LEN = "_18_06_02.obf.gz".length()
|
||||
String region = fileName.substring(0, fileName.length() - 16).toLowerCase();
|
||||
url += "®ion" + encode(region);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue