Documentation
¶
Overview ¶
Package pms decodes documented Plex Media Server JSON envelopes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
Directory []Section `json:"Directory"`
Metadata []Metadata `json:"Metadata"`
Hub []Hub `json:"Hub"`
MachineIdentifier string `json:"machineIdentifier"`
Version string `json:"version"`
Size int `json:"size"`
TotalSize int `json:"totalSize"`
Offset int `json:"offset"`
}
Container is MediaContainer as documented by the PMS OpenAPI spec.
type Hub ¶
type Hub struct {
Title string `json:"title"`
Type string `json:"type"`
Metadata []Metadata `json:"Metadata"`
}
Hub is a search hub from GET /hubs/search.
type Metadata ¶
type Metadata struct {
RatingKey flexString `json:"ratingKey"`
Key string `json:"key"`
Title string `json:"title"`
Type string `json:"type"`
Duration int64 `json:"duration"`
ViewOffset int64 `json:"viewOffset"`
Thumb string `json:"thumb"`
Year int `json:"year"`
Index int `json:"index"`
ParentIndex int `json:"parentIndex"`
ParentRatingKey flexString `json:"parentRatingKey"`
ParentTitle string `json:"parentTitle"`
GrandparentRatingKey flexString `json:"grandparentRatingKey"`
GrandparentTitle string `json:"grandparentTitle"`
LibrarySectionID flexString `json:"librarySectionID"`
TitleSort string `json:"titleSort"`
AddedAt int64 `json:"addedAt"`
Media []media `json:"Media"`
Session session `json:"Session"`
}
Metadata is a metadata item from the documented metadata schema.
func (*Metadata) File ¶
File returns the first on-disk part path from metadata.
Returns:
- path: The first non-empty part file, or empty when none exist.
func (*Metadata) HasMetadata ¶
HasMetadata reports whether the item has a ratingKey or metadata key.
Returns:
- ok: True when the item can map onto a MediaItem.
Click to show internal directories.
Click to hide internal directories.