mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-12 05:25:36 +02:00
feat: working resource patching
This commit is contained in:
parent
e373aef2d9
commit
4b2806c519
8 changed files with 107 additions and 64 deletions
|
@ -17,7 +17,11 @@ class GithubAPI {
|
|||
}
|
||||
}
|
||||
|
||||
Future<File?> latestReleaseFile(String org, repoName) async {
|
||||
Future<File?> latestReleaseFile(
|
||||
String extension,
|
||||
String org,
|
||||
repoName,
|
||||
) async {
|
||||
try {
|
||||
var latestRelease = await _github.repositories.getLatestRelease(
|
||||
RepositorySlug(org, repoName),
|
||||
|
@ -25,7 +29,7 @@ class GithubAPI {
|
|||
String? url = latestRelease.assets
|
||||
?.firstWhere((asset) =>
|
||||
asset.name != null &&
|
||||
(asset.name!.endsWith('.dex') || asset.name!.endsWith('.apk')) &&
|
||||
asset.name!.endsWith(extension) &&
|
||||
!asset.name!.contains('-sources') &&
|
||||
!asset.name!.contains('-javadoc'))
|
||||
.browserDownloadUrl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue