SmartPlaylistSearchTerm: Fix filetype search
This commit is contained in:
parent
83d762287f
commit
3f3ae7c38f
|
@ -38,9 +38,18 @@ QString SmartPlaylistSearchTerm::ToSql() const {
|
||||||
|
|
||||||
QString col = FieldColumnName(field_);
|
QString col = FieldColumnName(field_);
|
||||||
QString date = DateName(date_, true);
|
QString date = DateName(date_, true);
|
||||||
QString value = value_.toString();
|
QString value;
|
||||||
value.replace('\'', "''");
|
value.replace('\'', "''");
|
||||||
|
|
||||||
|
value = value_.toString();
|
||||||
|
if (field_ == Field_Filetype) {
|
||||||
|
Song::FileType filetype = Song::FiletypeByExtension(value);
|
||||||
|
if (filetype == Song::FileType_Unknown) {
|
||||||
|
filetype = Song::FiletypeByDescription(value);
|
||||||
|
}
|
||||||
|
value = QString::number(static_cast<int>(filetype));
|
||||||
|
}
|
||||||
|
|
||||||
QString second_value;
|
QString second_value;
|
||||||
|
|
||||||
bool special_date_query = (operator_ == SmartPlaylistSearchTerm::Op_NumericDate ||
|
bool special_date_query = (operator_ == SmartPlaylistSearchTerm::Op_NumericDate ||
|
||||||
|
|
Loading…
Reference in New Issue