Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Follow providers in search results.

Fixes #970
  • Loading branch information...
commit 9bbc5066cdf4ab5549149f1a2ae582b26d1efcf0 1 parent f0eb6ea
@tru tru authored
Showing with 14 additions and 2 deletions.
  1. +14 −2 plex/GUI/GUIWindowPlexSearch.cpp
View
16 plex/GUI/GUIWindowPlexSearch.cpp
@@ -363,8 +363,12 @@ void CGUIWindowPlexSearch::ProcessResults(CFileItemList* results)
for (int i = 0; i < results->Size(); i ++)
{
CFileItemPtr item = results->Get(i);
- item->SetProperty("plexServerName", server->GetName());
- item->SetProperty("plexServerOwner", server->GetOwner());
+
+ if (item && server)
+ {
+ item->SetProperty("plexServerName", server->GetName());
+ item->SetProperty("plexServerOwner", server->GetOwner());
+ }
if (item && m_resultMap.find(item->GetPlexDirectoryType()) != m_resultMap.end())
{
@@ -378,6 +382,14 @@ void CGUIWindowPlexSearch::ProcessResults(CFileItemList* results)
list = mappedRes[item->GetPlexDirectoryType()];
list->Add(item);
}
+ else if (item && item->GetPlexDirectoryType() == PLEX_DIR_TYPE_PROVIDER)
+ {
+ CLog::Log(LOGDEBUG, "CGUIWindowPlexSearch::ProcessResults got provider, sending additional requests");
+
+ CURL u(item->GetPath());
+ u.SetOption("query", m_currentSearchString);
+ m_currentSearchId.push_back(CJobManager::GetInstance().AddJob(new CPlexDirectoryFetchJob(u), this, CJob::PRIORITY_LOW));
+ }
}
std::pair<int, CFileItemListPtr> pair;
Please sign in to comment.
Something went wrong with that request. Please try again.