Skip to content

Instantly share code, notes, and snippets.

@jrudio
Created May 1, 2018 02:23
Show Gist options
  • Save jrudio/bf43b823d4308d5e5edc11c3f9cb2e47 to your computer and use it in GitHub Desktop.
Save jrudio/bf43b823d4308d5e5edc11c3f9cb2e47 to your computer and use it in GitHub Desktop.
Result of using `gojson` on the json response of the plex endpoint `/library/metadata/xxx`
type SearchResultsEpisode struct {
MediaContainer struct {
Metadata []struct {
Director []struct {
Filter string `json:"filter"`
ID int64 `json:"id"`
Tag string `json:"tag"`
} `json:"Director"`
Media []struct {
Part []struct {
Stream []struct {
AudioChannelLayout string `json:"audioChannelLayout"`
BitDepth int64 `json:"bitDepth"`
Bitrate int64 `json:"bitrate"`
Channels int64 `json:"channels"`
ChromaLocation string `json:"chromaLocation"`
ChromaSubsampling string `json:"chromaSubsampling"`
Codec string `json:"codec"`
ColorRange string `json:"colorRange"`
ColorSpace string `json:"colorSpace"`
Default bool `json:"default"`
FrameRate float64 `json:"frameRate"`
HasScalingMatrix bool `json:"hasScalingMatrix"`
Height int64 `json:"height"`
ID int64 `json:"id"`
Index int64 `json:"index"`
Level int64 `json:"level"`
Profile string `json:"profile"`
RefFrames int64 `json:"refFrames"`
SamplingRate int64 `json:"samplingRate"`
ScanType string `json:"scanType"`
Selected bool `json:"selected"`
StreamType int64 `json:"streamType"`
Width int64 `json:"width"`
} `json:"Stream"`
Container string `json:"container"`
Duration int64 `json:"duration"`
File string `json:"file"`
ID int64 `json:"id"`
Key string `json:"key"`
Size int64 `json:"size"`
VideoProfile string `json:"videoProfile"`
} `json:"Part"`
AspectRatio float64 `json:"aspectRatio"`
AudioChannels int64 `json:"audioChannels"`
AudioCodec string `json:"audioCodec"`
Bitrate int64 `json:"bitrate"`
Container string `json:"container"`
Duration int64 `json:"duration"`
Height int64 `json:"height"`
ID int64 `json:"id"`
VideoCodec string `json:"videoCodec"`
VideoFrameRate string `json:"videoFrameRate"`
VideoProfile string `json:"videoProfile"`
VideoResolution string `json:"videoResolution"`
Width int64 `json:"width"`
} `json:"Media"`
Writer []struct {
Filter string `json:"filter"`
ID int64 `json:"id"`
Tag string `json:"tag"`
} `json:"Writer"`
AddedAt int64 `json:"addedAt"`
Art string `json:"art"`
ContentRating string `json:"contentRating"`
Duration int64 `json:"duration"`
GrandparentArt string `json:"grandparentArt"`
GrandparentKey string `json:"grandparentKey"`
GrandparentRatingKey string `json:"grandparentRatingKey"`
GrandparentTheme string `json:"grandparentTheme"`
GrandparentThumb string `json:"grandparentThumb"`
GrandparentTitle string `json:"grandparentTitle"`
GUID string `json:"guid"`
Index int64 `json:"index"`
Key string `json:"key"`
LastViewedAt int64 `json:"lastViewedAt"`
LibrarySectionID int64 `json:"librarySectionID"`
LibrarySectionKey string `json:"librarySectionKey"`
LibrarySectionTitle string `json:"librarySectionTitle"`
OriginallyAvailableAt string `json:"originallyAvailableAt"`
ParentIndex int64 `json:"parentIndex"`
ParentKey string `json:"parentKey"`
ParentRatingKey string `json:"parentRatingKey"`
ParentThumb string `json:"parentThumb"`
ParentTitle string `json:"parentTitle"`
Rating int64 `json:"rating"`
RatingKey string `json:"ratingKey"`
Summary string `json:"summary"`
Thumb string `json:"thumb"`
Title string `json:"title"`
Type string `json:"type"`
UpdatedAt int64 `json:"updatedAt"`
ViewCount int64 `json:"viewCount"`
Year int64 `json:"year"`
} `json:"Metadata"`
AllowSync bool `json:"allowSync"`
Identifier string `json:"identifier"`
LibrarySectionID int64 `json:"librarySectionID"`
LibrarySectionTitle string `json:"librarySectionTitle"`
LibrarySectionUUID string `json:"librarySectionUUID"`
MediaTagPrefix string `json:"mediaTagPrefix"`
MediaTagVersion int64 `json:"mediaTagVersion"`
Size int64 `json:"size"`
} `json:"MediaContainer"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment