Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Added searching capability for episodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbart committed Dec 23, 2012
1 parent 1dab49f commit c2f0df2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Server/Library/Section/Show.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,27 @@ public function searchShows($query)
)
);
}

/**
* Searches episode titles for the passed query and returns the episodes
* that match.
*
* @param string $query The search term against which the episodes will be
* matched.
*
* @uses Plex_Server_Library::getItems()
* @uses Plex_Server_Library_SectionAbstract::buildSearchEndpoint()
* @uses Plex_Server_Library_SectionAbstract::SEARCH_TYPE_EPISODE
*
* @return Plex_Server_Library_Item_Episode[] An array of episode objects.
*/
public function searchEpisodes($query)
{
return $this->getItems(
$this->buildSearchEndpoint(
Plex_Server_Library_SectionAbstract::SEARCH_TYPE_EPISODE,
$query
)
);
}
}

0 comments on commit c2f0df2

Please sign in to comment.