1
0
Fork 0

Allow other words to fill in for spaces in metacollector queries.

liquidsoap-2.2
Icedream 2022-09-12 15:50:31 +02:00
parent 21638e41c7
commit 068bccc2b4
Signed by: icedream
GPG Key ID: 468BBEEBB9EC6AEA
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ func (m *manager) GetTrackByArtistAndTitle(artist, title string, withCoverFile b
err = db. err = db.
Where("artist = @artist AND title COLLATE UTF8_GENERAL_CI LIKE @title", Where("artist = @artist AND title COLLATE UTF8_GENERAL_CI LIKE @title",
sql.Named("artist", artist), sql.Named("artist", artist),
sql.Named("title", title+"%")). sql.Named("title", strings.ReplaceAll(title, " ", "%")+"%")).
Find(result).Error Find(result).Error
return return
} }