package main
import(
"context"
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithAccepts(components.AcceptsApplicationXML),
plexgo.WithClientIdentifier("abc123"),
plexgo.WithProduct("Plex for Roku"),
plexgo.WithVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithPlatformVersion("4.3 build 1057"),
plexgo.WithDevice("Roku 3"),
plexgo.WithModel("4200X"),
plexgo.WithDeviceVendor("Roku"),
plexgo.WithDeviceName("Living Room TV"),
plexgo.WithMarketplace("googlePlay"),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Library.GetLibraryMatches(ctx, operations.GetLibraryMatchesRequest{
IncludeFullMetadata: components.BoolIntOne.ToPointer(),
IncludeAncestorMetadata: components.BoolIntOne.ToPointer(),
IncludeAlternateMetadataSources: components.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithMetadata != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"Metadata": [
{
"title": "<unknown>",
"type": "<unknown>",
"absoluteIndex": 123,
"addedAt": 123,
"art": "<unknown>",
"audienceRating": 5,
"audienceRatingImage": "<unknown>",
"Autotag": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"banner": "<unknown>",
"chapterSource": "<unknown>",
"composite": "<unknown>",
"contentRating": "<unknown>",
"Country": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"Director": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"duration": 123,
"Filter": [
{
"title": "<string>",
"type": "<string>",
"art": "<string>",
"content": true,
"filter": "<string>",
"hasPrefs": true,
"hasStoreServices": true,
"hubKey": "<string>",
"identifier": "<string>",
"key": "<string>",
"lastAccessedAt": 123,
"Pivot": [
{
"title": "<string>",
"type": "<string>",
"context": "<string>",
"id": "<string>",
"key": "<string>",
"symbol": "<string>"
}
],
"share": 123,
"thumb": "<string>",
"titleBar": "<string>",
"filterType": "<string>"
}
],
"Genre": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"grandparentArt": "<string>",
"grandparentHero": "<string>",
"grandparentKey": "<string>",
"grandparentRatingKey": "<string>",
"grandparentTheme": "<string>",
"grandparentThumb": "<string>",
"grandparentTitle": "<string>",
"Guid": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"hero": "<unknown>",
"Image": [
{
"type": "background",
"alt": "<string>",
"url": "<string>"
}
],
"index": 123,
"key": "<unknown>",
"lastViewedAt": 123,
"leafCount": 123,
"Media": [
{
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "<unknown>",
"audioProfile": "<unknown>",
"bitrate": 5612,
"container": "<unknown>",
"duration": 150192,
"has64bitOffsets": false,
"hasVoiceActivity": true,
"height": 544,
"id": 1,
"optimizedForStreaming": false,
"Part": [
{
"audioProfile": "<unknown>",
"container": "mov",
"duration": 150192,
"file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov",
"has64bitOffsets": false,
"id": 1,
"key": "/library/parts/1/1531779263/file.mov",
"optimizedForStreaming": false,
"size": 105355654,
"Stream": [
{
"default": true,
"audioChannelLayout": "<unknown>",
"bitDepth": 8,
"bitrate": 5466,
"canAutoSync": true,
"chromaLocation": "<unknown>",
"chromaSubsampling": "<unknown>",
"codec": "h264",
"colorPrimaries": "<unknown>",
"colorRange": "<unknown>",
"colorSpace": "<unknown>",
"colorTrc": "<unknown>",
"displayTitle": "English (H.264 Main)",
"frameRate": 23.976,
"hasScalingMatrix": "<unknown>",
"height": 544,
"id": 1,
"index": 0,
"key": "/library/streams/1",
"language": "<unknown>",
"languageCode": "eng",
"level": 31,
"profile": "<unknown>",
"refFrames": 2,
"samplingRate": 48000,
"selected": true,
"streamIdentifier": 1,
"streamType": 1,
"width": 1280
}
],
"videoProfile": "<unknown>"
}
],
"videoCodec": "<unknown>",
"videoFrameRate": "<unknown>",
"videoProfile": "<unknown>",
"videoResolution": "<unknown>",
"width": 1280
}
],
"originallyAvailableAt": "<unknown>",
"originalTitle": "<unknown>",
"parentHero": "<string>",
"parentIndex": 123,
"parentKey": "<string>",
"parentRatingKey": "<string>",
"parentThumb": "<string>",
"parentTitle": "<string>",
"primaryExtraKey": "<unknown>",
"prompt": "<string>",
"rating": 5,
"Rating": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"ratingCount": 123,
"ratingImage": "<unknown>",
"ratingKey": "<unknown>",
"Role": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"search": true,
"secondary": true,
"skipChildren": true,
"skipParent": true,
"Sort": [
{
"title": "<string>",
"type": "<string>",
"art": "<string>",
"content": true,
"filter": "<string>",
"hasPrefs": true,
"hasStoreServices": true,
"hubKey": "<string>",
"identifier": "<string>",
"key": "<string>",
"lastAccessedAt": 123,
"Pivot": [
{
"title": "<string>",
"type": "<string>",
"context": "<string>",
"id": "<string>",
"key": "<string>",
"symbol": "<string>"
}
],
"share": 123,
"thumb": "<string>",
"titleBar": "<string>",
"default": "asc",
"defaultDirection": "asc",
"descKey": "<string>",
"firstCharacterKey": "<string>"
}
],
"studio": "<unknown>",
"subtype": "<unknown>",
"summary": "<unknown>",
"tagline": "<unknown>",
"theme": "<unknown>",
"thumb": "<unknown>",
"titleSort": "<unknown>",
"updatedAt": 123,
"userRating": 5,
"viewCount": 123,
"viewedLeafCount": 123,
"viewOffset": 123,
"Writer": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"year": 123
}
]
}
}The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic “hints” about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints.
This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata.
The endpoint response can including multiple matches, if there is ambiguity, each one containing a score from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching).
The guid hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB ttXXX) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of Jane Eyre, which could refer to the 1943 or the 2011 version).
Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title
package main
import(
"context"
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithAccepts(components.AcceptsApplicationXML),
plexgo.WithClientIdentifier("abc123"),
plexgo.WithProduct("Plex for Roku"),
plexgo.WithVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithPlatformVersion("4.3 build 1057"),
plexgo.WithDevice("Roku 3"),
plexgo.WithModel("4200X"),
plexgo.WithDeviceVendor("Roku"),
plexgo.WithDeviceName("Living Room TV"),
plexgo.WithMarketplace("googlePlay"),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Library.GetLibraryMatches(ctx, operations.GetLibraryMatchesRequest{
IncludeFullMetadata: components.BoolIntOne.ToPointer(),
IncludeAncestorMetadata: components.BoolIntOne.ToPointer(),
IncludeAlternateMetadataSources: components.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithMetadata != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"Metadata": [
{
"title": "<unknown>",
"type": "<unknown>",
"absoluteIndex": 123,
"addedAt": 123,
"art": "<unknown>",
"audienceRating": 5,
"audienceRatingImage": "<unknown>",
"Autotag": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"banner": "<unknown>",
"chapterSource": "<unknown>",
"composite": "<unknown>",
"contentRating": "<unknown>",
"Country": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"Director": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"duration": 123,
"Filter": [
{
"title": "<string>",
"type": "<string>",
"art": "<string>",
"content": true,
"filter": "<string>",
"hasPrefs": true,
"hasStoreServices": true,
"hubKey": "<string>",
"identifier": "<string>",
"key": "<string>",
"lastAccessedAt": 123,
"Pivot": [
{
"title": "<string>",
"type": "<string>",
"context": "<string>",
"id": "<string>",
"key": "<string>",
"symbol": "<string>"
}
],
"share": 123,
"thumb": "<string>",
"titleBar": "<string>",
"filterType": "<string>"
}
],
"Genre": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"grandparentArt": "<string>",
"grandparentHero": "<string>",
"grandparentKey": "<string>",
"grandparentRatingKey": "<string>",
"grandparentTheme": "<string>",
"grandparentThumb": "<string>",
"grandparentTitle": "<string>",
"Guid": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"hero": "<unknown>",
"Image": [
{
"type": "background",
"alt": "<string>",
"url": "<string>"
}
],
"index": 123,
"key": "<unknown>",
"lastViewedAt": 123,
"leafCount": 123,
"Media": [
{
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "<unknown>",
"audioProfile": "<unknown>",
"bitrate": 5612,
"container": "<unknown>",
"duration": 150192,
"has64bitOffsets": false,
"hasVoiceActivity": true,
"height": 544,
"id": 1,
"optimizedForStreaming": false,
"Part": [
{
"audioProfile": "<unknown>",
"container": "mov",
"duration": 150192,
"file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov",
"has64bitOffsets": false,
"id": 1,
"key": "/library/parts/1/1531779263/file.mov",
"optimizedForStreaming": false,
"size": 105355654,
"Stream": [
{
"default": true,
"audioChannelLayout": "<unknown>",
"bitDepth": 8,
"bitrate": 5466,
"canAutoSync": true,
"chromaLocation": "<unknown>",
"chromaSubsampling": "<unknown>",
"codec": "h264",
"colorPrimaries": "<unknown>",
"colorRange": "<unknown>",
"colorSpace": "<unknown>",
"colorTrc": "<unknown>",
"displayTitle": "English (H.264 Main)",
"frameRate": 23.976,
"hasScalingMatrix": "<unknown>",
"height": 544,
"id": 1,
"index": 0,
"key": "/library/streams/1",
"language": "<unknown>",
"languageCode": "eng",
"level": 31,
"profile": "<unknown>",
"refFrames": 2,
"samplingRate": 48000,
"selected": true,
"streamIdentifier": 1,
"streamType": 1,
"width": 1280
}
],
"videoProfile": "<unknown>"
}
],
"videoCodec": "<unknown>",
"videoFrameRate": "<unknown>",
"videoProfile": "<unknown>",
"videoResolution": "<unknown>",
"width": 1280
}
],
"originallyAvailableAt": "<unknown>",
"originalTitle": "<unknown>",
"parentHero": "<string>",
"parentIndex": 123,
"parentKey": "<string>",
"parentRatingKey": "<string>",
"parentThumb": "<string>",
"parentTitle": "<string>",
"primaryExtraKey": "<unknown>",
"prompt": "<string>",
"rating": 5,
"Rating": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"ratingCount": 123,
"ratingImage": "<unknown>",
"ratingKey": "<unknown>",
"Role": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"search": true,
"secondary": true,
"skipChildren": true,
"skipParent": true,
"Sort": [
{
"title": "<string>",
"type": "<string>",
"art": "<string>",
"content": true,
"filter": "<string>",
"hasPrefs": true,
"hasStoreServices": true,
"hubKey": "<string>",
"identifier": "<string>",
"key": "<string>",
"lastAccessedAt": 123,
"Pivot": [
{
"title": "<string>",
"type": "<string>",
"context": "<string>",
"id": "<string>",
"key": "<string>",
"symbol": "<string>"
}
],
"share": 123,
"thumb": "<string>",
"titleBar": "<string>",
"default": "asc",
"defaultDirection": "asc",
"descKey": "<string>",
"firstCharacterKey": "<string>"
}
],
"studio": "<unknown>",
"subtype": "<unknown>",
"summary": "<unknown>",
"tagline": "<unknown>",
"theme": "<unknown>",
"thumb": "<unknown>",
"titleSort": "<unknown>",
"updatedAt": 123,
"userRating": 5,
"viewCount": 123,
"viewedLeafCount": 123,
"viewOffset": 123,
"Writer": [
{
"confidence": 123,
"context": "<string>",
"filter": "actor=49",
"id": 123,
"ratingKey": "<string>",
"role": "Secretary",
"tag": "Shaun Lawton",
"tagKey": "5d3ee12c4cde6a001c3e0b27",
"tagType": 123,
"thumb": "<unknown>"
}
],
"year": 123
}
]
}
}The token which identifies the user accessing the PMS. This can be either:
JWT tokens provide better security with:
Indicates the client accepts the indicated media types
application/json, application/xml An opaque identifier unique to the client
"abc123"
The name of the client product
"Plex for Roku"
The version of the client application
"2.4.1"
The platform of the client
"Roku"
The version of the platform
"4.3 build 1057"
A relatively friendly name for the client device
"Roku 3"
A potentially less friendly identifier for the device model
"4200X"
The device vendor
"Roku"
A friendly name for the client
"Living Room TV"
The marketplace on which the client application is distributed
"googlePlay"
The metadata type to filter by
Whether or not to include full metadata on a positive match. When set, and the best match exceeds a score threshold of 85, metadata as rich as possible is sent back.
0, 1 Whether or not to include metadata for the item's ancestor (e.g. show and season data for an episode).
0, 1 Whether or not to return all sources for each metadata field, which results in a different structure being passed back.
0, 1 Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined.
The title to filter by or assign
Used for movies shows, and albums. Optional.
Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item.
Used for episodes and tracks. The title of the show/artist. Required if path isn't passed.
Used for episodes. The year of the show.
Used for episodes and tracks. The season/album number.
Used for episodes and tracks. The episode/tracks number in the season/album.
Used for episodes. In the format YYYY-MM-DD.
Used for albums and tracks. The artist name for albums or the album name for tracks.
OK
MediaContainer is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the parentTitle attribute may appear on the MediaContainer rather than being repeated on each track.
Show child attributes
The offset of where this container page starts among the total objects available. Also provided in the X-Plex-Container-Start header.
The total size of objects available. Also provided in the X-Plex-Container-Total-Size header.
Show child attributes
The title of the item (e.g. “300” or “The Simpsons”)
The type of the video item, such as movie, episode, or clip.
When present, contains the disc number for a track on multi-disc albums.
In units of seconds since the epoch, returns the time at which the item was added to the library.
When present, the URL for the background artwork for the item.
Some rating systems separate reviewer ratings from audience ratings
0 <= x <= 10A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
Show child attributes
Measure of the confidence of an automatic tag
A filter parameter that can be used to query for more content that matches this tag value.
"actor=49"
The role this actor played
"Secretary"
The value of the tag (the name)
"Shaun Lawton"
Plex identifier for this tag which can be used to fetch additional information from plex.tv
"5d3ee12c4cde6a001c3e0b27"
When present, the URL for a banner graphic for the item.
When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two).
When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
If known, the content rating (e.g. MPAA) for an item.
Show child attributes
Measure of the confidence of an automatic tag
A filter parameter that can be used to query for more content that matches this tag value.
"actor=49"
The role this actor played
"Secretary"
The value of the tag (the name)
"Shaun Lawton"
Plex identifier for this tag which can be used to fetch additional information from plex.tv
"5d3ee12c4cde6a001c3e0b27"
Show child attributes
Measure of the confidence of an automatic tag
A filter parameter that can be used to query for more content that matches this tag value.
"actor=49"
The role this actor played
"Secretary"
The value of the tag (the name)
"Shaun Lawton"
Plex identifier for this tag which can be used to fetch additional information from plex.tv
"5d3ee12c4cde6a001c3e0b27"
When present, the duration for the item, in units of milliseconds.
Typically only seen in metadata at a library's top level
Show child attributes
The title for the filter.
This represents the filter name used for the filter, which can be used to construct complex media queries with.
This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a type argument that matches the metadata type of the Type element.
Show child attributes
This is either string, integer, or boolean, and describes the type of values used for the filter.
Show child attributes
Measure of the confidence of an automatic tag
A filter parameter that can be used to query for more content that matches this tag value.
"actor=49"
The role this actor played
"Secretary"
The value of the tag (the name)
"Shaun Lawton"
Plex identifier for this tag which can be used to fetch additional information from plex.tv
"5d3ee12c4cde6a001c3e0b27"
The art of the grandparent
The hero of the grandparent
The key of the grandparent
The ratingKey of the grandparent
The theme of the grandparent
The thumb of the grandparent
The title of the grandparent
Show child attributes
Measure of the confidence of an automatic tag
A filter parameter that can be used to query for more content that matches this tag value.
"actor=49"
The role this actor played
"Secretary"
The value of the tag (the name)
"Shaun Lawton"
Plex identifier for this tag which can be used to fetch additional information from plex.tv
"5d3ee12c4cde6a001c3e0b27"
When present, the URL for a hero image for the item.
Show child attributes
Describes both the purpose and intended presentation of the image.
background, banner, clearLogo, coverPoster, snapshot Title to use for accessibility.
The relative path or absolute url for the image.
When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details.
When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
For shows and seasons, contains the number of total episodes.
Show child attributes
2.35
2
5612
150192
false
true
544
1
false
Show child attributes
The container of the media file, such as mp4 or mkv
"mov"
The duration of the media item, in milliseconds
150192
The local file path at which the part is stored on the server
"/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov"
false
1
The key from which the media can be streamed
"/library/parts/1/1531779263/file.mov"
false
The size of the media, in bytes
105355654
Show child attributes
true
8
5466
For subtitle streams only. If true then the server can attempt to automatically sync the subtitle timestamps with the video.
true
The codec of the stream, such as h264 or aac
"h264"
A friendly name for the stream, often comprised of the language and codec information
"English (H.264 Main)"
23.976
544
1
If the stream is part of the Part and not an external resource, the index of the stream within that part
0
If the stream is independently streamable, the key from which it can be streamed
"/library/streams/1"
The three character language code for the stream contents
"eng"
31
2
48000
1
A number indicating the type of the stream. 1 for video, 2 for audio, 3 for subtitles, 4 for lyrics
1
1280
1280
When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well.
When present, used to indicate an item's original title, e.g. a movie's foreign title.
The hero of the parent
The index of the parent
The key of the parent
The ratingKey of the parent
The thumb of the parent
The title of the parent
Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item.
Prompt to give the user for this directory (such as Search Movies)
When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
0 <= x <= 10Show child attributes
Measure of the confidence of an automatic tag
A filter parameter that can be used to query for more content that matches this tag value.
"actor=49"
The role this actor played
"Secretary"
The value of the tag (the name)
"Shaun Lawton"
Plex identifier for this tag which can be used to fetch additional information from plex.tv
"5d3ee12c4cde6a001c3e0b27"
Number of ratings under this metadata
When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten.
This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed.
Show child attributes
Measure of the confidence of an automatic tag
A filter parameter that can be used to query for more content that matches this tag value.
"actor=49"
The role this actor played
"Secretary"
The value of the tag (the name)
"Shaun Lawton"
Plex identifier for this tag which can be used to fetch additional information from plex.tv
"5d3ee12c4cde6a001c3e0b27"
Indicates this is a search directory
Used by old clients to provide nested menus allowing for primative (but structured) navigation.
When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc.
When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
Typically only seen in metadata at a library's top level
Show child attributes
The title of the field.
The key to use in the sort field to make items sort by this item
Show child attributes
If present, this sort is the default and in this direction
asc, desc This default diction of this sort
asc, desc The key for sorting this field in reverse order
The key to use to get items sorted by this field and indexed by the first character
When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
The subtype of the video item, such as photo when the video item is in a photo library
When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
When present, a pithy one-liner about the item (usually only seen for movies).
When present, the URL for theme music for the item (usually only for TV shows).
When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail.
Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
When the user has rated an item, this contains the user rating
0 <= x <= 10When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
For shows and seasons, contains the number of viewed episodes.
When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
Show child attributes
Measure of the confidence of an automatic tag
A filter parameter that can be used to query for more content that matches this tag value.
"actor=49"
The role this actor played
"Secretary"
The value of the tag (the name)
"Shaun Lawton"
Plex identifier for this tag which can be used to fetch additional information from plex.tv
"5d3ee12c4cde6a001c3e0b27"
When present, the year associated with the item's release (e.g. release year for a movie).
Was this page helpful?