diff options
author | nea <nea@nea.moe> | 2023-02-28 01:31:31 +0100 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-02-28 01:31:31 +0100 |
commit | cc8764afa6eee98c05c10da03ad71cab33ed03ba (patch) | |
tree | b539cbd21034dde59434f08b001d815dc031000f /src/main/java/moe | |
parent | a373dbd3348833724055916a33961d0f6c34d4f6 (diff) | |
download | libautoupdate-cc8764afa6eee98c05c10da03ad71cab33ed03ba.tar.gz libautoupdate-cc8764afa6eee98c05c10da03ad71cab33ed03ba.tar.bz2 libautoupdate-cc8764afa6eee98c05c10da03ad71cab33ed03ba.zip |
Allow .jar extension instead of MIME type
Diffstat (limited to 'src/main/java/moe')
-rw-r--r-- | src/main/java/moe/nea/libautoupdate/GithubReleaseUpdateSource.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/moe/nea/libautoupdate/GithubReleaseUpdateSource.java b/src/main/java/moe/nea/libautoupdate/GithubReleaseUpdateSource.java index 6742261..38bfd86 100644 --- a/src/main/java/moe/nea/libautoupdate/GithubReleaseUpdateSource.java +++ b/src/main/java/moe/nea/libautoupdate/GithubReleaseUpdateSource.java @@ -63,7 +63,7 @@ public class GithubReleaseUpdateSource extends JsonUpdateSource { protected UpdateData findAsset(GithubRelease release) { if (release.getAssets() == null) return null; return release.getAssets().stream() - .filter(it -> Objects.equals(it.getContentType(), "application/x-java-archive") && it.getBrowserDownloadUrl() != null) + .filter(it -> (Objects.equals(it.getContentType(), "application/x-java-archive") || (it.getName() != null && it.getName().endsWith(".jar"))) && it.getBrowserDownloadUrl() != null) .map(it -> new UpdateData( release.getName() == null ? release.getTagName() : release.getName(), new JsonPrimitive(release.getTagName()), |