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

Commit c2f0df2

Browse files
committed
Added searching capability for episodes.
1 parent 1dab49f commit c2f0df2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Server/Library/Section/Show.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,4 +269,27 @@ public function searchShows($query)
269269
)
270270
);
271271
}
272+
273+
/**
274+
* Searches episode titles for the passed query and returns the episodes
275+
* that match.
276+
*
277+
* @param string $query The search term against which the episodes will be
278+
* matched.
279+
*
280+
* @uses Plex_Server_Library::getItems()
281+
* @uses Plex_Server_Library_SectionAbstract::buildSearchEndpoint()
282+
* @uses Plex_Server_Library_SectionAbstract::SEARCH_TYPE_EPISODE
283+
*
284+
* @return Plex_Server_Library_Item_Episode[] An array of episode objects.
285+
*/
286+
public function searchEpisodes($query)
287+
{
288+
return $this->getItems(
289+
$this->buildSearchEndpoint(
290+
Plex_Server_Library_SectionAbstract::SEARCH_TYPE_EPISODE,
291+
$query
292+
)
293+
);
294+
}
272295
}

0 commit comments

Comments
 (0)