diff --git a/app/build.gradle b/app/build.gradle index ecebdcc..02b2418 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.lazyeraser.imas.derehelper" minSdkVersion 17 targetSdkVersion 25 - versionCode 15 - versionName "1.0.5" + versionCode 16 + versionName "1.0.6" multiDexEnabled true vectorDrawables.useSupportLibrary = true } diff --git a/app/src/main/java/com/lazyeraser/imas/cgss/service/CGSSService.java b/app/src/main/java/com/lazyeraser/imas/cgss/service/CGSSService.java index fcc41eb..90e3ee7 100644 --- a/app/src/main/java/com/lazyeraser/imas/cgss/service/CGSSService.java +++ b/app/src/main/java/com/lazyeraser/imas/cgss/service/CGSSService.java @@ -16,13 +16,13 @@ public interface CGSSService { - @GET("https://storages.game.starlight-stage.jp/dl/{version}/manifests/Android_AHigh_SHigh") + @GET("https://asset-starlight-stage.akamaized.net/dl/{version}/manifests/Android_AHigh_SHigh") // @Headers("X-Unity-Version:" + SStaticR.UNITY_VERSION) Observable getManifests(@Path("version") String version, @Header("X-Unity-Version") String unityVer); - @GET("https://storages.game.starlight-stage.jp/dl/resources/Generic/{hash}") + @GET("https://asset-starlight-stage.akamaized.net/dl/resources/Generic/{head}/{hash}") // @Headers("X-Unity-Version:" + SStaticR.UNITY_VERSION) - Observable getResources(@Path("hash") String hash, @Header("X-Unity-Version") String unityVer); + Observable getResources(@Path("head") String head, @Path("hash") String hash, @Header("X-Unity-Version") String unityVer); @GET("http://346lab.org/dl/cgss_assets/{version}/manifests/Android_AHigh_SHigh") Observable getManifestsRP(@Path("version") String version); diff --git a/app/src/main/java/com/lazyeraser/imas/cgss/utils/DBHelper.java b/app/src/main/java/com/lazyeraser/imas/cgss/utils/DBHelper.java index 233f245..7dd4c68 100644 --- a/app/src/main/java/com/lazyeraser/imas/cgss/utils/DBHelper.java +++ b/app/src/main/java/com/lazyeraser/imas/cgss/utils/DBHelper.java @@ -150,6 +150,12 @@ public void onCreate(SQLiteDatabase db) { } } + @Override + public void onOpen(SQLiteDatabase db) { + super.onOpen(db); + db.disableWriteAheadLogging(); + } + public void beginTran(){ getWritableDatabase().beginTransaction(); } diff --git a/app/src/main/java/com/lazyeraser/imas/cgss/viewmodel/LiveVm.java b/app/src/main/java/com/lazyeraser/imas/cgss/viewmodel/LiveVm.java index fd5a463..ad10593 100644 --- a/app/src/main/java/com/lazyeraser/imas/cgss/viewmodel/LiveVm.java +++ b/app/src/main/java/com/lazyeraser/imas/cgss/viewmodel/LiveVm.java @@ -110,7 +110,7 @@ private void updateBeatMapFile(int liveId, int diffcult){ Manifest manifest = (Manifest)o; Observable file = umi.getSP(SharedHelper.KEY_USE_REVERSE_PROXY) ? RetrofitProvider.getInstance(false).create(CGSSService.class).getResourcesRP(manifest.getHash()) : - RetrofitProvider.getInstance(false).create(CGSSService.class).getResources(manifest.getHash(), umi.spRead(SharedHelper.KEY_UNITY_VERSION)); + RetrofitProvider.getInstance(false).create(CGSSService.class).getResources(manifest.getHash().substring(0, 2), manifest.getHash(), umi.spRead(SharedHelper.KEY_UNITY_VERSION)); file.subscribeOn(Schedulers.io()) .subscribe(responseBody -> { try { diff --git a/app/src/main/java/com/lazyeraser/imas/cgss/viewmodel/MainViewModel.java b/app/src/main/java/com/lazyeraser/imas/cgss/viewmodel/MainViewModel.java index 0ac0131..96a2ffe 100644 --- a/app/src/main/java/com/lazyeraser/imas/cgss/viewmodel/MainViewModel.java +++ b/app/src/main/java/com/lazyeraser/imas/cgss/viewmodel/MainViewModel.java @@ -260,7 +260,7 @@ private void downLoadFiles(int i, String masterHash, String truthVersion){ String hash = hashToDownload.get(i); Observable file = useReverseProxy ? RetrofitProvider.getInstance(false).create(CGSSService.class).getResourcesRP(hash) : - RetrofitProvider.getInstance(false).create(CGSSService.class).getResources(hash, umi.spRead(SharedHelper.KEY_UNITY_VERSION)); + RetrofitProvider.getInstance(false).create(CGSSService.class).getResources(hash.substring(0, 2), hash, umi.spRead(SharedHelper.KEY_UNITY_VERSION)); file.subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(responseBody -> { diff --git a/app/src/main/java/com/lazyeraser/imas/main/SStaticR.java b/app/src/main/java/com/lazyeraser/imas/main/SStaticR.java index 7fea5bb..f63d7d0 100644 --- a/app/src/main/java/com/lazyeraser/imas/main/SStaticR.java +++ b/app/src/main/java/com/lazyeraser/imas/main/SStaticR.java @@ -22,7 +22,7 @@ public class SStaticR { public final static boolean isJp = Locale.getDefault().getLanguage().endsWith("ja"); public final static boolean isEN = !(isCn || isJp); - public final static String SERVER_URL_RES = "https://truecolor.kirara.ca"; + public final static String SERVER_URL_RES = "https://hidamarirhodonite.kirara.ca"; public final static String SERVER_URL_UPDATE = "https://raw.githubusercontent.com/Lazyeraser/DereHelper/master/appupdate/"; private final static String SERVER_URL_CN = "http://starlight.346lab.org"; diff --git a/app/src/main/java/com/lazyeraser/imas/retrofit/ExceptionHandler.java b/app/src/main/java/com/lazyeraser/imas/retrofit/ExceptionHandler.java index 12d736a..de3bf37 100644 --- a/app/src/main/java/com/lazyeraser/imas/retrofit/ExceptionHandler.java +++ b/app/src/main/java/com/lazyeraser/imas/retrofit/ExceptionHandler.java @@ -30,6 +30,7 @@ public class ExceptionHandler { private static final int GATEWAY_TIMEOUT = 504; public static void handleException(Throwable e) { + e.printStackTrace(); ResponseThrowable ex; @StringRes int msg = R.string.network_error_0; if (e instanceof HttpException) { @@ -93,7 +94,7 @@ public void run() { } }.start(); }*/ - ex.printStackTrace(); + } diff --git a/appupdate/version.json b/appupdate/version.json index e08c0ee..ec36b72 100644 --- a/appupdate/version.json +++ b/appupdate/version.json @@ -1,11 +1,11 @@ { "appname": "DereHelper", - "apkname": "DereHelper-1.0.5.apk", - "verName": " 1.0.5", - "md5": "7065c26ce8ed000fa96b380bcc358c68", - "url": "http://346lab.org/derehelper/apk/DereHelper-1.0.5.apk", - "verInfo": "1.修复更新后无法正常加载最新数据的BUG", + "apkname": "DereHelper-1.0.6.apk", + "verName": " 1.0.6", + "md5": "60d047b1e0947317d11e6552395325d4", + "url": "http://346lab.org/derehelper/apk/DereHelper-1.0.6.apk", + "verInfo": "1.修复数据下载逻辑\n2.修复Android 9.0闪退", "verInfo_jp": "1.不具合の修正", "verInfo_en": "1.Bug fixes", - "verCode": 15 + "verCode": 16 } \ No newline at end of file