The main API endpoint exposed by this plugin is /Episode/{ItemId}/IntroTimestamps
. If an introduction was detected inside of a television episode, this endpoint will return the timestamps of that intro.
An API version can be optionally selected by appending /v{Version}
to the URL. If a version is not specified, version 1 will be selected.
API version 1 was introduced with the initial alpha release of the plugin. It is accessible (via a GET
request) on the following URLs:
/Episode/{ItemId}/IntroTimestamps
/Episode/{ItemId}/IntroTimestamps/v1
Both of these endpoints require an authorization token to be provided.
The possible status codes of this endpoint are:
200 (OK)
: An introduction was detected for this item and the response is deserializable as JSON using the schema below.404 (Not Found)
: Either no introduction was detected for this item or it is not a television episode.
JSON schema:
The ShowSkipPromptAt
and HideSkipPromptAt
properties are derived from the start time of the introduction and are customizable by the user from the plugin's settings.
curl
command to get introduction timestamps for the item with id 12345678901234567890123456789012
:
curl http://127.0.0.1:8096/Episode/12345678901234567890123456789012/IntroTimestamps/v1 -H 'Authorization: MediaBrowser Token="98765432109876543210987654321098"'
This returns the following JSON object:
{
"EpisodeId": "12345678901234567890123456789012",
"Valid": true,
"IntroStart": 304,
"IntroEnd": 397.48,
"ShowSkipPromptAt": 299,
"HideSkipPromptAt": 314
}