[UI/MOBILE] WIP on internal path support

This commit is contained in:
emeric
2016-03-06 00:44:24 +01:00
parent a07704c218
commit f8c808433f
34 changed files with 696 additions and 454 deletions
+9 -1
View File
@@ -60,6 +60,14 @@ PreviewSearchView::PreviewSearchView(Wt::WContainerWidget* parent)
wApp->setInternalPath(path, true);
}));
trackSearch->showMore().connect(std::bind([=]
{
std::string path = wApp->internalPath();
path.replace(0, pathPrefix.length(), "/audio/search/track");
wApp->setInternalPath(path, true);
}));
wApp->internalPathChanged().connect(std::bind([=] (std::string path)
{
if (!wApp->internalPathMatches(pathPrefix))
@@ -68,7 +76,7 @@ PreviewSearchView::PreviewSearchView(Wt::WContainerWidget* parent)
std::vector<std::string> keywords = searchPathToSearchKeywords(path.substr(pathPrefix.length()));
artistSearch->search(SearchFilter::ByNameAnd(SearchFilter::Field::Artist, keywords), SEARCH_NB_ITEMS);
releaseSearch->search(SearchFilter::ByNameAnd(SearchFilter::Field::Release, keywords), SEARCH_NB_ITEMS);
releaseSearch->search(SearchFilter::ByNameAnd(SearchFilter::Field::Release, keywords), SEARCH_NB_ITEMS, "Releases");
trackSearch->search(SearchFilter::ByNameAnd(SearchFilter::Field::Track, keywords), SEARCH_NB_ITEMS);
}, std::placeholders::_1));