File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 1
1
package migration
2
2
3
3
func init () {
4
- migration2v4 ()
5
4
migration2v6 ()
5
+ migration2v7 ()
6
6
}
Original file line number Diff line number Diff line change @@ -6,11 +6,10 @@ import (
6
6
"github.com/spf13/viper"
7
7
"github.com/zu1k/nali/internal/constant"
8
8
"github.com/zu1k/nali/internal/db"
9
- "github.com/zu1k/nali/pkg/cdn"
10
- "github.com/zu1k/nali/pkg/ip2region"
9
+ "github.com/zu1k/nali/pkg/qqwry"
11
10
)
12
11
13
- func migration2v4 () {
12
+ func migration2v7 () {
14
13
viper .SetConfigName ("config" )
15
14
viper .SetConfigType ("yaml" )
16
15
viper .AddConfigPath (constant .ConfigDirPath )
@@ -28,16 +27,9 @@ func migration2v4() {
28
27
29
28
needOverwrite := false
30
29
for _ , adb := range dbList {
31
- if adb .Name == "ip2region " && adb .File != "ip2region.xdb " {
30
+ if adb .Name == "qqwry " && len ( adb .DownloadUrls ) == 1 && adb . DownloadUrls [ 0 ] == "https://99wry.cf/qqwry.dat " {
32
31
needOverwrite = true
33
- adb .File = "ip2region.xdb"
34
- adb .DownloadUrls = ip2region .DownloadUrls
35
- }
36
-
37
- if adb .Name == "cdn" && adb .Format != "cdn-yml" {
38
- needOverwrite = true
39
- adb .Format = "cdn-yml"
40
- adb .DownloadUrls = cdn .DownloadUrls
32
+ adb .DownloadUrls = qqwry .DownloadUrls
41
33
}
42
34
}
43
35
You can’t perform that action at this time.
0 commit comments