1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-22 21:29:02 +08:00

fix crash and fix migration qqwry #161 (#162)

* fix crash #161

* fix migration qqwry
This commit is contained in:
oldshensheep 2023-05-01 20:53:49 +08:00 committed by GitHub
parent de355d1f7a
commit 748c5cf4a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,13 +28,15 @@ func migration2v7() {
needOverwrite := false needOverwrite := false
for _, adb := range dbList { for _, adb := range dbList {
if adb.Name == "qqwry" && if adb.Name == "qqwry" {
(adb.DownloadUrls[0] == "https://99wry.cf/qqwry.dat" || if len(adb.DownloadUrls) == 0 ||
strings.Contains(adb.DownloadUrls[0], "sspanel-uim")) { adb.DownloadUrls[0] == "https://99wry.cf/qqwry.dat" ||
strings.Contains(adb.DownloadUrls[0], "sspanel-uim") {
needOverwrite = true needOverwrite = true
adb.DownloadUrls = qqwry.DownloadUrls adb.DownloadUrls = qqwry.DownloadUrls
} }
} }
}
if needOverwrite { if needOverwrite {
viper.Set("databases", dbList) viper.Set("databases", dbList)