From b12889ce395deaeeb7bb8c4c746f88cf54d66535 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Fri, 7 Jun 2024 14:51:04 +0200 Subject: [PATCH] Search: add 'type' filter --- src/library/searchqueryparser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/library/searchqueryparser.cpp b/src/library/searchqueryparser.cpp index 1c76ee094e7..9fe1941f8c7 100644 --- a/src/library/searchqueryparser.cpp +++ b/src/library/searchqueryparser.cpp @@ -81,7 +81,8 @@ SearchQueryParser::SearchQueryParser(TrackCollection* pTrackCollection, QStringL << "grouping" << "comment" << "location" - << "crate"; + << "crate" + << "type"; m_numericFilters << "track" << "played" << "rating" @@ -114,6 +115,7 @@ SearchQueryParser::SearchQueryParser(TrackCollection* pTrackCollection, QStringL m_fieldToSqlColumns["lastplayed"] << "last_played_at"; m_fieldToSqlColumns["rating"] << "rating"; m_fieldToSqlColumns["location"] << "location"; + m_fieldToSqlColumns["type"] << "filetype"; m_fieldToSqlColumns["datetime_added"] << "datetime_added"; m_textFilterMatcher = QRegularExpression(QString("^-?(%1):(.*)$").arg(m_textFilters.join("|")));