Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 4419ed1

Browse files
committed
Fix Googlers Magisk Repo url.
1 parent 82813bc commit 4419ed1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

app/src/main/java/com/fox2code/mmm/repo/CustomRepoManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import android.content.SharedPreferences;
55

66
import com.fox2code.mmm.MainApplication;
7+
import com.fox2code.mmm.utils.PropUtils;
78

89
public class CustomRepoManager {
910
private static final boolean AUTO_RECOMPILE = true;
@@ -23,7 +24,7 @@ public class CustomRepoManager {
2324
int lastFilled = 0;
2425
for (int i = 0; i < MAX_CUSTOM_REPOS; i++) {
2526
String repo = sharedPreferences.getString("repo_" + i, "");
26-
if (!repo.isEmpty() && !RepoManager.isBuiltInRepo(repo)) {
27+
if (!PropUtils.isNullString(repo) && !RepoManager.isBuiltInRepo(repo)) {
2728
lastFilled = i;
2829
int index = AUTO_RECOMPILE ?
2930
this.customReposCount : i;

app/src/main/java/com/fox2code/mmm/repo/RepoManager.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public final class RepoManager extends SyncManager {
5050
"https://repo.dergoogler.com/modules.json";
5151
public static final String DG_MAGISK_REPO_GITHUB =
5252
"https://googlers-magisk-repo.github.io/modules.json";
53+
public static final String DG_MAGISK_REPO_GITHUB_RAW =
54+
"https://raw.githubusercontent.com/Googlers-Repo/googlers-repo.github.io/master/modules.json";
5355

5456
private static final Object lock = new Object();
5557
private static volatile RepoManager INSTANCE;
@@ -91,7 +93,7 @@ private RepoManager(MainApplication mainApplication) {
9193
altRepo.defaultSubmitModule =
9294
"https://github.com/Magisk-Modules-Alt-Repo/submission/issues";
9395
RepoData dgRepo = this.addRepoData(
94-
DG_MAGISK_REPO_GITHUB, "Googlers Magisk Repo");
96+
DG_MAGISK_REPO_GITHUB_RAW, "Googlers Magisk Repo");
9597
dgRepo.defaultWebsite = "https://dergoogler.com/repo";
9698
this.androidacyRepoData = this.addAndroidacyRepoData();
9799
this.customRepoManager = new CustomRepoManager(mainApplication, this);
@@ -139,8 +141,9 @@ public RepoData addOrGet(String url) {
139141
public RepoData addOrGet(String url, String fallBackName) {
140142
if (MAGISK_ALT_REPO_JSDELIVR.equals(url))
141143
url = MAGISK_ALT_REPO;
142-
if (DG_MAGISK_REPO.equals(url))
143-
url = DG_MAGISK_REPO_GITHUB;
144+
if (DG_MAGISK_REPO.equals(url) ||
145+
DG_MAGISK_REPO_GITHUB.equals(url))
146+
url = DG_MAGISK_REPO_GITHUB_RAW;
144147
RepoData repoData;
145148
synchronized (this.syncLock) {
146149
repoData = this.repoData.get(url);
@@ -260,6 +263,7 @@ public static String internalIdOfUrl(String url) {
260263
return "androidacy_repo";
261264
case DG_MAGISK_REPO:
262265
case DG_MAGISK_REPO_GITHUB:
266+
case DG_MAGISK_REPO_GITHUB_RAW:
263267
return "dg_magisk_repo";
264268
default:
265269
return "repo_" + Hashes.hashSha1(
@@ -275,6 +279,7 @@ static boolean isBuiltInRepo(String repo) {
275279
case RepoManager.ANDROIDACY_TEST_MAGISK_REPO_ENDPOINT:
276280
case RepoManager.DG_MAGISK_REPO:
277281
case RepoManager.DG_MAGISK_REPO_GITHUB:
282+
case RepoManager.DG_MAGISK_REPO_GITHUB_RAW:
278283
return true;
279284
}
280285
return false;

0 commit comments

Comments
 (0)