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

Commit

Permalink
Added single item retrieval from the show section class.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbart committed Dec 25, 2012
1 parent d216734 commit 2e14839
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Server/Library/Section/Show.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,36 @@ public function searchEpisodes($query)
)
);
}

/**
* Returns a single show by its rating key, key, or exact title match.
*
* @param integer|string $polymorphicData Either a rating key, a key, or a
* title for an exact title match that will be used to retrieve a single
* show.
*
* @uses Plex_Server_Library_SectionAbstract::getPolymorphicItem()
*
* @retrun Plex_Server_Library_Item_Show A Plex library show object.
*/
public function getShow($polymorphicData)
{
return $this->getPolymorphicItem($polymorphicData);
}

/**
* Returns a single episode by its rating key, key, or exact title match.
*
* @param integer|string $polymorphicData Either a rating key, a key, or a
* title for an exact title match that will be used to retrieve a single
* episode.
*
* @uses Plex_Server_Library_SectionAbstract::getPolymorphicItem()
*
* @retrun Plex_Server_Library_Item_Episode A Plex library episode object.
*/
public function getEpisode($polymorphicData)
{
return $this->getPolymorphicItem($polymorphicData);
}
}

0 comments on commit 2e14839

Please sign in to comment.