Commit 45ff60c4 authored by Dark Zane's avatar Dark Zane Committed by GitHub

Update ServerUtil.java

I noticed that when downloading the expansion files the indicator that there were new pre-released cards remained active, I checked the code and noticed that the address was not declared correctly, so I made the change to make it work.
parent 755bc872
...@@ -58,7 +58,7 @@ public class ServerUtil { ...@@ -58,7 +58,7 @@ public class ServerUtil {
String oldVer = SharedPreferenceUtil.getExpansionDataVer(); String oldVer = SharedPreferenceUtil.getExpansionDataVer();
LogUtil.i(TAG, "server util, old pre-card version:" + oldVer); LogUtil.i(TAG, "server util, old pre-card version:" + oldVer);
String URL_DATAVER = URL_CN_DATAVER; String URL_DATAVER = URL_CN_DATAVER;
URL_DATAVER = (AppsSettings.get().getDataLanguage() == AppsSettings.languageEnum.Chinese.code) ? URL_CN_DATAVER : "https://github.com/DaruKani/TransSuperpre/blob/main/" + getLanguageId() + "/version.txt"; URL_DATAVER = (AppsSettings.get().getDataLanguage() == AppsSettings.languageEnum.Chinese.code) ? URL_CN_DATAVER : "https://raw.githubusercontent.com/ElderLich/TransSuperpre/refs/heads/main/" + getLanguageId() + "/version.txt";
OkhttpUtil.get(URL_DATAVER, new Callback() { OkhttpUtil.get(URL_DATAVER, new Callback() {
@Override @Override
public void onFailure(Call call, IOException e) { public void onFailure(Call call, IOException e) {
...@@ -317,14 +317,14 @@ public class ServerUtil { ...@@ -317,14 +317,14 @@ public class ServerUtil {
public static String downloadUrl() { public static String downloadUrl() {
String url; String url;
url = (AppsSettings.get().getDataLanguage() == AppsSettings.languageEnum.Chinese.code) url = (AppsSettings.get().getDataLanguage() == AppsSettings.languageEnum.Chinese.code)
? URL_SUPERPRE_CN_FILE : "https://raw.githubusercontent.com/DaruKani/TransSuperpre/refs/heads/main/" + getLanguageId() + "/ygopro-super-pre.ypk"; ? URL_SUPERPRE_CN_FILE : "https://raw.githubusercontent.com/ElderLich/TransSuperpre/refs/heads/main/" + getLanguageId() + "/ygopro-super-pre.ypk";
return url; return url;
} }
public static String preCardListJson() { public static String preCardListJson() {
String json; String json;
json = (AppsSettings.get().getDataLanguage() == AppsSettings.languageEnum.Chinese.code) json = (AppsSettings.get().getDataLanguage() == AppsSettings.languageEnum.Chinese.code)
? URL_PRE_CARD : "https://raw.githubusercontent.com/DaruKani/TransSuperpre/refs/heads/main/" + getLanguageId() + "/test-release.json"; ? URL_PRE_CARD : "https://raw.githubusercontent.com/ElderLich/TransSuperpre/refs/heads/main/" + getLanguageId() + "/test-release.json";
return json; return json;
} }
public enum ExCardState { public enum ExCardState {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment