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 to the movie section.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbart committed Dec 23, 2012
1 parent c2f0df2 commit 3d6c79d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Server/Library/Section/Movie.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,4 +411,27 @@ public function getResolutions()
)
);
}

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

0 comments on commit 3d6c79d

Please sign in to comment.