Add filename and url to text search columns
This commit is contained in:
parent
548fa3f6ee
commit
7119f1bc81
|
@ -157,7 +157,9 @@ const QStringList Song::kTextSearchColumns = QStringList() << QStringLitera
|
||||||
<< QStringLiteral("performer")
|
<< QStringLiteral("performer")
|
||||||
<< QStringLiteral("grouping")
|
<< QStringLiteral("grouping")
|
||||||
<< QStringLiteral("genre")
|
<< QStringLiteral("genre")
|
||||||
<< QStringLiteral("comment");
|
<< QStringLiteral("comment")
|
||||||
|
<< QStringLiteral("filename")
|
||||||
|
<< QStringLiteral("url");
|
||||||
|
|
||||||
const QStringList Song::kIntSearchColumns = QStringList() << QStringLiteral("track")
|
const QStringList Song::kIntSearchColumns = QStringList() << QStringLiteral("track")
|
||||||
<< QStringLiteral("year")
|
<< QStringLiteral("year")
|
||||||
|
|
|
@ -46,6 +46,8 @@ QVariant FilterTree::DataFromColumn(const QString &column, const Song &metadata)
|
||||||
if (column == QLatin1String("rating")) return metadata.rating();
|
if (column == QLatin1String("rating")) return metadata.rating();
|
||||||
if (column == QLatin1String("playcount")) return metadata.playcount();
|
if (column == QLatin1String("playcount")) return metadata.playcount();
|
||||||
if (column == QLatin1String("skipcount")) return metadata.skipcount();
|
if (column == QLatin1String("skipcount")) return metadata.skipcount();
|
||||||
|
if (column == QLatin1String("filename")) return metadata.basefilename();
|
||||||
|
if (column == QLatin1String("url")) return metadata.effective_stream_url().toString();
|
||||||
|
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue