Skip to content

Commit

Permalink
fix data
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazyeraser committed Mar 4, 2019
1 parent a096e34 commit 5a3f552
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ResponseBody> 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<ResponseBody> getResources(@Path("hash") String hash, @Header("X-Unity-Version") String unityVer);
Observable<ResponseBody> 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<ResponseBody> getManifestsRP(@Path("version") String version);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void updateBeatMapFile(int liveId, int diffcult){
Manifest manifest = (Manifest)o;
Observable<ResponseBody> 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ private void downLoadFiles(int i, String masterHash, String truthVersion){
String hash = hashToDownload.get(i);
Observable<ResponseBody> 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 -> {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/lazyeraser/imas/main/SStaticR.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -93,7 +94,7 @@ public void run() {
}
}.start();
}*/
ex.printStackTrace();

}


Expand Down
12 changes: 6 additions & 6 deletions appupdate/version.json
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 5a3f552

Please sign in to comment.