mirror of
https://github.com/cnsilvan/UnblockNeteaseMusic.git
synced 2025-01-09 04:28:41 +08:00
optimized the rules;
This commit is contained in:
parent
d8a24e8ee2
commit
6d8d10f179
2
build.sh
2
build.sh
@ -1,4 +1,4 @@
|
||||
CurrentVersion=0.2.10
|
||||
CurrentVersion=0.2.11
|
||||
Project=github.com/cnsilvan/UnblockNeteaseMusic
|
||||
Path="$Project/version"
|
||||
ExecName="UnblockNeteaseMusic"
|
||||
|
@ -46,6 +46,14 @@ func CalScore(song common.SearchSong, songName string, singerName string, index
|
||||
if strings.Contains(songName, "伴奏") && !strings.Contains(song.Keyword, "伴奏") {
|
||||
return 0, false
|
||||
}
|
||||
if strings.Contains(strings.ToUpper(songName), "DJ") &&
|
||||
!strings.Contains(strings.ToUpper(song.Keyword), "DJ") {
|
||||
return 0, false
|
||||
}
|
||||
if strings.Contains(strings.ToUpper(songName), "cover") &&
|
||||
!strings.Contains(strings.ToUpper(song.Keyword), "cover") {
|
||||
return 0, false
|
||||
}
|
||||
var songNameSores float32 = 0.0
|
||||
if len(songName) > 0 {
|
||||
songNameSores = utils.CalMatchScoresV2(song.Name, songName, "songName")
|
||||
|
@ -40,7 +40,7 @@ func (m *KuWo) SearchSong(song common.SearchSong) (songs []*common.Song) {
|
||||
maxIndex = 10
|
||||
}
|
||||
for index, matched := range list {
|
||||
if index >= maxIndex {
|
||||
if index >= 1 {//kuwo list order by score default
|
||||
break
|
||||
}
|
||||
kuWoSong, ok := matched.(common.MapType)
|
||||
|
Loading…
Reference in New Issue
Block a user