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:
parent
2157677c32
commit
92f894be94
@ -59,9 +59,11 @@ extension MPDClient {
|
|||||||
|
|
||||||
mpd_search_db_songs(self.connection, false)
|
mpd_search_db_songs(self.connection, false)
|
||||||
if filter != "" {
|
if filter != "" {
|
||||||
|
let escapedFilter = filter.replacingOccurrences(of: "'", with: "\\'")
|
||||||
|
|
||||||
mpd_search_add_expression(
|
mpd_search_add_expression(
|
||||||
self.connection,
|
self.connection,
|
||||||
"(any contains '\(filter)')"
|
"(any contains '\(escapedFilter)')"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
mpd_search_add_tag_constraint(self.connection, MPD_OPERATOR_DEFAULT, MPD_TAG_TRACK, "1")
|
mpd_search_add_tag_constraint(self.connection, MPD_OPERATOR_DEFAULT, MPD_TAG_TRACK, "1")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user