1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00

Fix search quote bug

This commit is contained in:
Daniel Barber 2020-10-09 13:53:13 -04:00
parent 2157677c32
commit 92f894be94
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -59,9 +59,11 @@ extension MPDClient {
mpd_search_db_songs(self.connection, false)
if filter != "" {
let escapedFilter = filter.replacingOccurrences(of: "'", with: "\\'")
mpd_search_add_expression(
self.connection,
"(any contains '\(filter)')"
"(any contains '\(escapedFilter)')"
)
}
mpd_search_add_tag_constraint(self.connection, MPD_OPERATOR_DEFAULT, MPD_TAG_TRACK, "1")