Skip to content

Commit f6670dc

Browse files
committed
add BundleMRS.7z
1 parent 5b0d073 commit f6670dc

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ task("downloadGeoFiles") {
4141
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat" to "geosite.dat",
4242
// "https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country.mmdb" to "country.mmdb",
4343
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb" to "ASN.mmdb",
44+
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/BundleMRS.7z" to "BundleMRS.7z",
4445
)
4546

4647
doLast {

app/src/main/java/com/github/kr328/clash/MainApplication.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ class MainApplication : Application() {
6868
assets.open("ASN.mmdb").copyTo(it)
6969
}
7070
}
71+
72+
val bundleMRSFile = File(clashDir, "BundleMRS.7z")
73+
if (bundleMRSFile.exists() && bundleMRSFile.lastModified() < updateDate) {
74+
bundleMRSFile.delete()
75+
}
76+
if (!bundleMRSFile.exists()) {
77+
FileOutputStream(bundleMRSFile).use {
78+
assets.open("BundleMRS.7z").copyTo(it)
79+
}
80+
}
7181
}
7282

7383
fun finalize() {

0 commit comments

Comments
 (0)