This commit is contained in:
Timo Ley 2020-07-25 18:03:00 +02:00 committed by GitHub
parent 8da44daa99
commit c8bc9dbfeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -43,19 +43,25 @@ public class AddonscriptJSON extends ASBase {
public void load() {
indexes.INSTALLERS.put("internal.dir", new InternalDirInstaller());
if (repositories != null) {
for (Repository r : repositories) {
indexes.REPOSITORIES.put(r.id, r.getRepository());
}
}
if (index != null) {
for (IndexEntry e : index) {
if (e.type != null && e.type.equals("addon"))
indexes.ADDONS.put(e.id, Utils.getFromURL(e.link));
else if (e.type != null && e.type.equals("version"))
indexes.VERSIONS.put(e.versionid, Utils.getFromURL(e.link).getDefaultVersion());
}
}
if (versions != null) {
for (Version v : versions) {
if (!indexes.VERSIONS.containsKey(v.versionid))
indexes.VERSIONS.put(v.versionid, v);
}
}
loaded = true;
}