mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
2534 lines
60 KiB
Go
2534 lines
60 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||
|
||
package operations
|
||
|
||
import (
|
||
"encoding/json"
|
||
"errors"
|
||
"fmt"
|
||
"github.com/LukeHagar/plexgo/internal/utils"
|
||
"github.com/LukeHagar/plexgo/types"
|
||
"net/http"
|
||
)
|
||
|
||
type GetMediaMetaDataRequest struct {
|
||
// The id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs.
|
||
RatingKey string `pathParam:"style=simple,explode=false,name=ratingKey"`
|
||
// Include concerts data if set to true.
|
||
IncludeConcerts *bool `queryParam:"style=form,explode=true,name=includeConcerts"`
|
||
// Include extra content (e.g. bonus features).
|
||
IncludeExtras *bool `queryParam:"style=form,explode=true,name=includeExtras"`
|
||
// Include on-deck items.
|
||
IncludeOnDeck *bool `queryParam:"style=form,explode=true,name=includeOnDeck"`
|
||
// Include popular leaves (episodes/chapters).
|
||
IncludePopularLeaves *bool `queryParam:"style=form,explode=true,name=includePopularLeaves"`
|
||
// Include preferences information.
|
||
IncludePreferences *bool `queryParam:"style=form,explode=true,name=includePreferences"`
|
||
// Include reviews for the content.
|
||
IncludeReviews *bool `queryParam:"style=form,explode=true,name=includeReviews"`
|
||
// Include chapter details.
|
||
IncludeChapters *bool `queryParam:"style=form,explode=true,name=includeChapters"`
|
||
// Include station data.
|
||
IncludeStations *bool `queryParam:"style=form,explode=true,name=includeStations"`
|
||
// Include external media data.
|
||
IncludeExternalMedia *bool `queryParam:"style=form,explode=true,name=includeExternalMedia"`
|
||
// Trigger asynchronous metadata augmentation.
|
||
AsyncAugmentMetadata *bool `queryParam:"style=form,explode=true,name=asyncAugmentMetadata"`
|
||
// Trigger asynchronous file checking.
|
||
AsyncCheckFiles *bool `queryParam:"style=form,explode=true,name=asyncCheckFiles"`
|
||
// Trigger asynchronous refresh of analysis.
|
||
AsyncRefreshAnalysis *bool `queryParam:"style=form,explode=true,name=asyncRefreshAnalysis"`
|
||
// Trigger asynchronous refresh of the local media agent.
|
||
AsyncRefreshLocalMediaAgent *bool `queryParam:"style=form,explode=true,name=asyncRefreshLocalMediaAgent"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetRatingKey() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.RatingKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetIncludeConcerts() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.IncludeConcerts
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetIncludeExtras() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.IncludeExtras
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetIncludeOnDeck() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.IncludeOnDeck
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetIncludePopularLeaves() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.IncludePopularLeaves
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetIncludePreferences() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.IncludePreferences
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetIncludeReviews() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.IncludeReviews
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetIncludeChapters() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.IncludeChapters
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetIncludeStations() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.IncludeStations
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetIncludeExternalMedia() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.IncludeExternalMedia
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetAsyncAugmentMetadata() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AsyncAugmentMetadata
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetAsyncCheckFiles() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AsyncCheckFiles
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetAsyncRefreshAnalysis() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AsyncRefreshAnalysis
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRequest) GetAsyncRefreshLocalMediaAgent() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AsyncRefreshLocalMediaAgent
|
||
}
|
||
|
||
// GetMediaMetaDataType - The type of media content in the Plex library. This can represent videos, music, or photos.
|
||
type GetMediaMetaDataType string
|
||
|
||
const (
|
||
GetMediaMetaDataTypeMovie GetMediaMetaDataType = "movie"
|
||
GetMediaMetaDataTypeTvShow GetMediaMetaDataType = "show"
|
||
GetMediaMetaDataTypeSeason GetMediaMetaDataType = "season"
|
||
GetMediaMetaDataTypeEpisode GetMediaMetaDataType = "episode"
|
||
GetMediaMetaDataTypeArtist GetMediaMetaDataType = "artist"
|
||
GetMediaMetaDataTypeAlbum GetMediaMetaDataType = "album"
|
||
GetMediaMetaDataTypeTrack GetMediaMetaDataType = "track"
|
||
GetMediaMetaDataTypePhotoAlbum GetMediaMetaDataType = "photoalbum"
|
||
GetMediaMetaDataTypePhoto GetMediaMetaDataType = "photo"
|
||
GetMediaMetaDataTypeCollection GetMediaMetaDataType = "collection"
|
||
)
|
||
|
||
func (e GetMediaMetaDataType) ToPointer() *GetMediaMetaDataType {
|
||
return &e
|
||
}
|
||
|
||
type GetMediaMetaDataLibraryType string
|
||
|
||
const (
|
||
GetMediaMetaDataLibraryTypeCoverPoster GetMediaMetaDataLibraryType = "coverPoster"
|
||
GetMediaMetaDataLibraryTypeBackground GetMediaMetaDataLibraryType = "background"
|
||
GetMediaMetaDataLibraryTypeSnapshot GetMediaMetaDataLibraryType = "snapshot"
|
||
GetMediaMetaDataLibraryTypeClearLogo GetMediaMetaDataLibraryType = "clearLogo"
|
||
)
|
||
|
||
func (e GetMediaMetaDataLibraryType) ToPointer() *GetMediaMetaDataLibraryType {
|
||
return &e
|
||
}
|
||
|
||
type GetMediaMetaDataImage struct {
|
||
Alt string `json:"alt"`
|
||
Type GetMediaMetaDataLibraryType `json:"type"`
|
||
URL string `json:"url"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataImage) GetAlt() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Alt
|
||
}
|
||
|
||
func (g *GetMediaMetaDataImage) GetType() GetMediaMetaDataLibraryType {
|
||
if g == nil {
|
||
return GetMediaMetaDataLibraryType("")
|
||
}
|
||
return g.Type
|
||
}
|
||
|
||
func (g *GetMediaMetaDataImage) GetURL() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.URL
|
||
}
|
||
|
||
type GetMediaMetaDataUltraBlurColors struct {
|
||
TopLeft string `json:"topLeft"`
|
||
TopRight string `json:"topRight"`
|
||
BottomRight string `json:"bottomRight"`
|
||
BottomLeft string `json:"bottomLeft"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataUltraBlurColors) GetTopLeft() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.TopLeft
|
||
}
|
||
|
||
func (g *GetMediaMetaDataUltraBlurColors) GetTopRight() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.TopRight
|
||
}
|
||
|
||
func (g *GetMediaMetaDataUltraBlurColors) GetBottomRight() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.BottomRight
|
||
}
|
||
|
||
func (g *GetMediaMetaDataUltraBlurColors) GetBottomLeft() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.BottomLeft
|
||
}
|
||
|
||
type GetMediaMetaDataGuids struct {
|
||
// The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||
//
|
||
ID string `json:"id"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataGuids) GetID() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
type GetMediaMetaDataOptimizedForStreaming1 int
|
||
|
||
const (
|
||
GetMediaMetaDataOptimizedForStreaming1Zero GetMediaMetaDataOptimizedForStreaming1 = 0
|
||
GetMediaMetaDataOptimizedForStreaming1One GetMediaMetaDataOptimizedForStreaming1 = 1
|
||
)
|
||
|
||
func (e GetMediaMetaDataOptimizedForStreaming1) ToPointer() *GetMediaMetaDataOptimizedForStreaming1 {
|
||
return &e
|
||
}
|
||
func (e *GetMediaMetaDataOptimizedForStreaming1) UnmarshalJSON(data []byte) error {
|
||
var v int
|
||
if err := json.Unmarshal(data, &v); err != nil {
|
||
return err
|
||
}
|
||
switch v {
|
||
case 0:
|
||
fallthrough
|
||
case 1:
|
||
*e = GetMediaMetaDataOptimizedForStreaming1(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for GetMediaMetaDataOptimizedForStreaming1: %v", v)
|
||
}
|
||
}
|
||
|
||
type GetMediaMetaDataOptimizedForStreamingType string
|
||
|
||
const (
|
||
GetMediaMetaDataOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreaming1 GetMediaMetaDataOptimizedForStreamingType = "get-media-meta-data_optimizedForStreaming_1"
|
||
GetMediaMetaDataOptimizedForStreamingTypeBoolean GetMediaMetaDataOptimizedForStreamingType = "boolean"
|
||
)
|
||
|
||
// GetMediaMetaDataOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||
type GetMediaMetaDataOptimizedForStreaming struct {
|
||
GetMediaMetaDataOptimizedForStreaming1 *GetMediaMetaDataOptimizedForStreaming1 `queryParam:"inline,name=optimizedForStreaming"`
|
||
Boolean *bool `queryParam:"inline,name=optimizedForStreaming"`
|
||
|
||
Type GetMediaMetaDataOptimizedForStreamingType
|
||
}
|
||
|
||
func CreateGetMediaMetaDataOptimizedForStreamingGetMediaMetaDataOptimizedForStreaming1(getMediaMetaDataOptimizedForStreaming1 GetMediaMetaDataOptimizedForStreaming1) GetMediaMetaDataOptimizedForStreaming {
|
||
typ := GetMediaMetaDataOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreaming1
|
||
|
||
return GetMediaMetaDataOptimizedForStreaming{
|
||
GetMediaMetaDataOptimizedForStreaming1: &getMediaMetaDataOptimizedForStreaming1,
|
||
Type: typ,
|
||
}
|
||
}
|
||
|
||
func CreateGetMediaMetaDataOptimizedForStreamingBoolean(boolean bool) GetMediaMetaDataOptimizedForStreaming {
|
||
typ := GetMediaMetaDataOptimizedForStreamingTypeBoolean
|
||
|
||
return GetMediaMetaDataOptimizedForStreaming{
|
||
Boolean: &boolean,
|
||
Type: typ,
|
||
}
|
||
}
|
||
|
||
func (u *GetMediaMetaDataOptimizedForStreaming) UnmarshalJSON(data []byte) error {
|
||
|
||
var getMediaMetaDataOptimizedForStreaming1 GetMediaMetaDataOptimizedForStreaming1 = GetMediaMetaDataOptimizedForStreaming1(0)
|
||
if err := utils.UnmarshalJSON(data, &getMediaMetaDataOptimizedForStreaming1, "", true, nil); err == nil {
|
||
u.GetMediaMetaDataOptimizedForStreaming1 = &getMediaMetaDataOptimizedForStreaming1
|
||
u.Type = GetMediaMetaDataOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreaming1
|
||
return nil
|
||
}
|
||
|
||
var boolean bool = false
|
||
if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil {
|
||
u.Boolean = &boolean
|
||
u.Type = GetMediaMetaDataOptimizedForStreamingTypeBoolean
|
||
return nil
|
||
}
|
||
|
||
return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetMediaMetaDataOptimizedForStreaming", string(data))
|
||
}
|
||
|
||
func (u GetMediaMetaDataOptimizedForStreaming) MarshalJSON() ([]byte, error) {
|
||
if u.GetMediaMetaDataOptimizedForStreaming1 != nil {
|
||
return utils.MarshalJSON(u.GetMediaMetaDataOptimizedForStreaming1, "", true)
|
||
}
|
||
|
||
if u.Boolean != nil {
|
||
return utils.MarshalJSON(u.Boolean, "", true)
|
||
}
|
||
|
||
return nil, errors.New("could not marshal union type GetMediaMetaDataOptimizedForStreaming: all fields are null")
|
||
}
|
||
|
||
type GetMediaMetaDataOptimizedForStreamingLibrary1 int
|
||
|
||
const (
|
||
GetMediaMetaDataOptimizedForStreamingLibrary1Zero GetMediaMetaDataOptimizedForStreamingLibrary1 = 0
|
||
GetMediaMetaDataOptimizedForStreamingLibrary1One GetMediaMetaDataOptimizedForStreamingLibrary1 = 1
|
||
)
|
||
|
||
func (e GetMediaMetaDataOptimizedForStreamingLibrary1) ToPointer() *GetMediaMetaDataOptimizedForStreamingLibrary1 {
|
||
return &e
|
||
}
|
||
func (e *GetMediaMetaDataOptimizedForStreamingLibrary1) UnmarshalJSON(data []byte) error {
|
||
var v int
|
||
if err := json.Unmarshal(data, &v); err != nil {
|
||
return err
|
||
}
|
||
switch v {
|
||
case 0:
|
||
fallthrough
|
||
case 1:
|
||
*e = GetMediaMetaDataOptimizedForStreamingLibrary1(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for GetMediaMetaDataOptimizedForStreamingLibrary1: %v", v)
|
||
}
|
||
}
|
||
|
||
type GetMediaMetaDataLibraryOptimizedForStreamingType string
|
||
|
||
const (
|
||
GetMediaMetaDataLibraryOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreamingLibrary1 GetMediaMetaDataLibraryOptimizedForStreamingType = "get-media-meta-data_optimizedForStreaming_Library_1"
|
||
GetMediaMetaDataLibraryOptimizedForStreamingTypeBoolean GetMediaMetaDataLibraryOptimizedForStreamingType = "boolean"
|
||
)
|
||
|
||
// GetMediaMetaDataLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||
type GetMediaMetaDataLibraryOptimizedForStreaming struct {
|
||
GetMediaMetaDataOptimizedForStreamingLibrary1 *GetMediaMetaDataOptimizedForStreamingLibrary1 `queryParam:"inline,name=optimizedForStreaming"`
|
||
Boolean *bool `queryParam:"inline,name=optimizedForStreaming"`
|
||
|
||
Type GetMediaMetaDataLibraryOptimizedForStreamingType
|
||
}
|
||
|
||
func CreateGetMediaMetaDataLibraryOptimizedForStreamingGetMediaMetaDataOptimizedForStreamingLibrary1(getMediaMetaDataOptimizedForStreamingLibrary1 GetMediaMetaDataOptimizedForStreamingLibrary1) GetMediaMetaDataLibraryOptimizedForStreaming {
|
||
typ := GetMediaMetaDataLibraryOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreamingLibrary1
|
||
|
||
return GetMediaMetaDataLibraryOptimizedForStreaming{
|
||
GetMediaMetaDataOptimizedForStreamingLibrary1: &getMediaMetaDataOptimizedForStreamingLibrary1,
|
||
Type: typ,
|
||
}
|
||
}
|
||
|
||
func CreateGetMediaMetaDataLibraryOptimizedForStreamingBoolean(boolean bool) GetMediaMetaDataLibraryOptimizedForStreaming {
|
||
typ := GetMediaMetaDataLibraryOptimizedForStreamingTypeBoolean
|
||
|
||
return GetMediaMetaDataLibraryOptimizedForStreaming{
|
||
Boolean: &boolean,
|
||
Type: typ,
|
||
}
|
||
}
|
||
|
||
func (u *GetMediaMetaDataLibraryOptimizedForStreaming) UnmarshalJSON(data []byte) error {
|
||
|
||
var getMediaMetaDataOptimizedForStreamingLibrary1 GetMediaMetaDataOptimizedForStreamingLibrary1 = GetMediaMetaDataOptimizedForStreamingLibrary1(0)
|
||
if err := utils.UnmarshalJSON(data, &getMediaMetaDataOptimizedForStreamingLibrary1, "", true, nil); err == nil {
|
||
u.GetMediaMetaDataOptimizedForStreamingLibrary1 = &getMediaMetaDataOptimizedForStreamingLibrary1
|
||
u.Type = GetMediaMetaDataLibraryOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreamingLibrary1
|
||
return nil
|
||
}
|
||
|
||
var boolean bool = false
|
||
if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil {
|
||
u.Boolean = &boolean
|
||
u.Type = GetMediaMetaDataLibraryOptimizedForStreamingTypeBoolean
|
||
return nil
|
||
}
|
||
|
||
return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetMediaMetaDataLibraryOptimizedForStreaming", string(data))
|
||
}
|
||
|
||
func (u GetMediaMetaDataLibraryOptimizedForStreaming) MarshalJSON() ([]byte, error) {
|
||
if u.GetMediaMetaDataOptimizedForStreamingLibrary1 != nil {
|
||
return utils.MarshalJSON(u.GetMediaMetaDataOptimizedForStreamingLibrary1, "", true)
|
||
}
|
||
|
||
if u.Boolean != nil {
|
||
return utils.MarshalJSON(u.Boolean, "", true)
|
||
}
|
||
|
||
return nil, errors.New("could not marshal union type GetMediaMetaDataLibraryOptimizedForStreaming: all fields are null")
|
||
}
|
||
|
||
// GetMediaMetaDataHasThumbnail - Indicates if the part has a thumbnail.
|
||
type GetMediaMetaDataHasThumbnail string
|
||
|
||
const (
|
||
GetMediaMetaDataHasThumbnailFalse GetMediaMetaDataHasThumbnail = "0"
|
||
GetMediaMetaDataHasThumbnailTrue GetMediaMetaDataHasThumbnail = "1"
|
||
)
|
||
|
||
func (e GetMediaMetaDataHasThumbnail) ToPointer() *GetMediaMetaDataHasThumbnail {
|
||
return &e
|
||
}
|
||
func (e *GetMediaMetaDataHasThumbnail) UnmarshalJSON(data []byte) error {
|
||
var v string
|
||
if err := json.Unmarshal(data, &v); err != nil {
|
||
return err
|
||
}
|
||
switch v {
|
||
case "0":
|
||
fallthrough
|
||
case "1":
|
||
*e = GetMediaMetaDataHasThumbnail(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for GetMediaMetaDataHasThumbnail: %v", v)
|
||
}
|
||
}
|
||
|
||
type GetMediaMetaDataStream struct {
|
||
// Unique stream identifier.
|
||
ID int64 `json:"id"`
|
||
// Stream type:
|
||
// - VIDEO = 1
|
||
// - AUDIO = 2
|
||
// - SUBTITLE = 3
|
||
//
|
||
streamType int64 `const:"1" json:"streamType"`
|
||
// Format of the stream (e.g., srt).
|
||
Format *string `json:"format,omitempty"`
|
||
// Indicates if this stream is default.
|
||
Default *bool `json:"default,omitempty"`
|
||
// Codec used by the stream.
|
||
Codec *string `json:"codec,omitempty"`
|
||
// Index of the stream.
|
||
Index *int `json:"index,omitempty"`
|
||
// Bitrate of the stream.
|
||
Bitrate *int `json:"bitrate,omitempty"`
|
||
// Language of the stream.
|
||
Language *string `json:"language,omitempty"`
|
||
// Language tag (e.g., en).
|
||
LanguageTag *string `json:"languageTag,omitempty"`
|
||
// ISO language code.
|
||
LanguageCode *string `json:"languageCode,omitempty"`
|
||
// Indicates whether header compression is enabled.
|
||
HeaderCompression *bool `json:"headerCompression,omitempty"`
|
||
// Dolby Vision BL compatibility ID.
|
||
DOVIBLCompatID *int `json:"DOVIBLCompatID,omitempty"`
|
||
// Indicates if Dolby Vision BL is present.
|
||
DOVIBLPresent *bool `json:"DOVIBLPresent,omitempty"`
|
||
// Indicates if Dolby Vision EL is present.
|
||
DOVIELPresent *bool `json:"DOVIELPresent,omitempty"`
|
||
// Dolby Vision level.
|
||
DOVILevel *int `json:"DOVILevel,omitempty"`
|
||
// Indicates if Dolby Vision is present.
|
||
DOVIPresent *bool `json:"DOVIPresent,omitempty"`
|
||
// Dolby Vision profile.
|
||
DOVIProfile *int `json:"DOVIProfile,omitempty"`
|
||
// Indicates if Dolby Vision RPU is present.
|
||
DOVIRPUPresent *bool `json:"DOVIRPUPresent,omitempty"`
|
||
// Dolby Vision version.
|
||
DOVIVersion *string `json:"DOVIVersion,omitempty"`
|
||
// Bit depth of the video stream.
|
||
BitDepth *int `json:"bitDepth,omitempty"`
|
||
// Chroma sample location.
|
||
ChromaLocation *string `json:"chromaLocation,omitempty"`
|
||
// Chroma subsampling format.
|
||
ChromaSubsampling *string `json:"chromaSubsampling,omitempty"`
|
||
// Coded video height.
|
||
CodedHeight *int `json:"codedHeight,omitempty"`
|
||
// Coded video width.
|
||
CodedWidth *int `json:"codedWidth,omitempty"`
|
||
ClosedCaptions *bool `json:"closedCaptions,omitempty"`
|
||
// Color primaries used.
|
||
ColorPrimaries *string `json:"colorPrimaries,omitempty"`
|
||
// Color range (e.g., tv).
|
||
ColorRange *string `json:"colorRange,omitempty"`
|
||
// Color space.
|
||
ColorSpace *string `json:"colorSpace,omitempty"`
|
||
// Color transfer characteristics.
|
||
ColorTrc *string `json:"colorTrc,omitempty"`
|
||
// Frame rate of the stream.
|
||
FrameRate *float32 `json:"frameRate,omitempty"`
|
||
// Key to access this stream part.
|
||
Key *string `json:"key,omitempty"`
|
||
// Height of the video stream.
|
||
Height *int `json:"height,omitempty"`
|
||
// Video level.
|
||
Level *int `json:"level,omitempty"`
|
||
// Indicates if this is the original stream.
|
||
Original *bool `json:"original,omitempty"`
|
||
HasScalingMatrix *bool `json:"hasScalingMatrix,omitempty"`
|
||
// Video profile.
|
||
Profile *string `json:"profile,omitempty"`
|
||
ScanType *string `json:"scanType,omitempty"`
|
||
EmbeddedInVideo *string `json:"embeddedInVideo,omitempty"`
|
||
// Number of reference frames.
|
||
RefFrames *int `json:"refFrames,omitempty"`
|
||
// Width of the video stream.
|
||
Width *int `json:"width,omitempty"`
|
||
// Display title for the stream.
|
||
DisplayTitle *string `json:"displayTitle,omitempty"`
|
||
// Extended display title for the stream.
|
||
ExtendedDisplayTitle *string `json:"extendedDisplayTitle,omitempty"`
|
||
// Indicates if this stream is selected (applicable for audio streams).
|
||
Selected *bool `json:"selected,omitempty"`
|
||
Forced *bool `json:"forced,omitempty"`
|
||
// Number of audio channels (for audio streams).
|
||
Channels *int `json:"channels,omitempty"`
|
||
// Audio channel layout.
|
||
AudioChannelLayout *string `json:"audioChannelLayout,omitempty"`
|
||
// Sampling rate for the audio stream.
|
||
SamplingRate *int `json:"samplingRate,omitempty"`
|
||
// Indicates if the stream can auto-sync.
|
||
CanAutoSync *bool `json:"canAutoSync,omitempty"`
|
||
// Indicates if the stream is for the hearing impaired.
|
||
HearingImpaired *bool `json:"hearingImpaired,omitempty"`
|
||
// Indicates if the stream is a dub.
|
||
Dub *bool `json:"dub,omitempty"`
|
||
// Optional title for the stream (e.g., language variant).
|
||
Title *string `json:"title,omitempty"`
|
||
}
|
||
|
||
func (g GetMediaMetaDataStream) MarshalJSON() ([]byte, error) {
|
||
return utils.MarshalJSON(g, "", false)
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) UnmarshalJSON(data []byte) error {
|
||
if err := utils.UnmarshalJSON(data, &g, "", false, []string{"id", "streamType"}); err != nil {
|
||
return err
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetID() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetStreamType() int64 {
|
||
return 1
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetFormat() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Format
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDefault() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Default
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetCodec() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Codec
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetIndex() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Index
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetBitrate() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Bitrate
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetLanguage() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Language
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetLanguageTag() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LanguageTag
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetLanguageCode() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LanguageCode
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetHeaderCompression() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.HeaderCompression
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDOVIBLCompatID() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DOVIBLCompatID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDOVIBLPresent() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DOVIBLPresent
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDOVIELPresent() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DOVIELPresent
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDOVILevel() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DOVILevel
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDOVIPresent() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DOVIPresent
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDOVIProfile() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DOVIProfile
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDOVIRPUPresent() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DOVIRPUPresent
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDOVIVersion() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DOVIVersion
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetBitDepth() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.BitDepth
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetChromaLocation() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ChromaLocation
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetChromaSubsampling() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ChromaSubsampling
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetCodedHeight() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.CodedHeight
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetCodedWidth() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.CodedWidth
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetClosedCaptions() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ClosedCaptions
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetColorPrimaries() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ColorPrimaries
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetColorRange() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ColorRange
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetColorSpace() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ColorSpace
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetColorTrc() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ColorTrc
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetFrameRate() *float32 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.FrameRate
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetKey() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Key
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetHeight() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Height
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetLevel() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Level
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetOriginal() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Original
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetHasScalingMatrix() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.HasScalingMatrix
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetProfile() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Profile
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetScanType() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ScanType
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetEmbeddedInVideo() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.EmbeddedInVideo
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetRefFrames() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.RefFrames
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetWidth() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Width
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDisplayTitle() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DisplayTitle
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetExtendedDisplayTitle() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ExtendedDisplayTitle
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetSelected() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Selected
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetForced() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Forced
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetChannels() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Channels
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetAudioChannelLayout() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AudioChannelLayout
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetSamplingRate() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.SamplingRate
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetCanAutoSync() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.CanAutoSync
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetHearingImpaired() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.HearingImpaired
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetDub() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Dub
|
||
}
|
||
|
||
func (g *GetMediaMetaDataStream) GetTitle() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Title
|
||
}
|
||
|
||
type GetMediaMetaDataPart struct {
|
||
// Indicates if the part is accessible.
|
||
Accessible *bool `json:"accessible,omitempty"`
|
||
// Indicates if the part exists.
|
||
Exists *bool `json:"exists,omitempty"`
|
||
// Unique part identifier.
|
||
ID int64 `json:"id"`
|
||
// Key to access this part.
|
||
Key *string `json:"key,omitempty"`
|
||
Indexes *string `json:"indexes,omitempty"`
|
||
// Duration of the part in milliseconds.
|
||
Duration *int `json:"duration,omitempty"`
|
||
// File path for the part.
|
||
File *string `json:"file,omitempty"`
|
||
// File size in bytes.
|
||
Size *int64 `json:"size,omitempty"`
|
||
PacketLength *int `json:"packetLength,omitempty"`
|
||
// Container format of the part.
|
||
Container *string `json:"container,omitempty"`
|
||
// Video profile for the part.
|
||
VideoProfile *string `json:"videoProfile,omitempty"`
|
||
// The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||
AudioProfile *string `json:"audioProfile,omitempty"`
|
||
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
|
||
// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||
//
|
||
OptimizedForStreaming *GetMediaMetaDataLibraryOptimizedForStreaming `json:"optimizedForStreaming,omitempty"`
|
||
HasThumbnail *GetMediaMetaDataHasThumbnail `default:"0" json:"hasThumbnail"`
|
||
Stream []GetMediaMetaDataStream `json:"Stream,omitempty"`
|
||
}
|
||
|
||
func (g GetMediaMetaDataPart) MarshalJSON() ([]byte, error) {
|
||
return utils.MarshalJSON(g, "", false)
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) UnmarshalJSON(data []byte) error {
|
||
if err := utils.UnmarshalJSON(data, &g, "", false, []string{"id"}); err != nil {
|
||
return err
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetAccessible() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Accessible
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetExists() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Exists
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetID() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetKey() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Key
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetIndexes() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Indexes
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetDuration() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Duration
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetFile() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.File
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetSize() *int64 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Size
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetPacketLength() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.PacketLength
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetContainer() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Container
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetVideoProfile() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.VideoProfile
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetAudioProfile() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AudioProfile
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetHas64bitOffsets() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Has64bitOffsets
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetOptimizedForStreaming() *GetMediaMetaDataLibraryOptimizedForStreaming {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.OptimizedForStreaming
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetHasThumbnail() *GetMediaMetaDataHasThumbnail {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.HasThumbnail
|
||
}
|
||
|
||
func (g *GetMediaMetaDataPart) GetStream() []GetMediaMetaDataStream {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Stream
|
||
}
|
||
|
||
type GetMediaMetaDataMedia struct {
|
||
// Unique media identifier.
|
||
ID int64 `json:"id"`
|
||
// Duration of the media in milliseconds.
|
||
Duration *int `json:"duration,omitempty"`
|
||
// Bitrate in bits per second.
|
||
Bitrate *int `json:"bitrate,omitempty"`
|
||
// Video width in pixels.
|
||
Width *int `json:"width,omitempty"`
|
||
// Video height in pixels.
|
||
Height *int `json:"height,omitempty"`
|
||
// Aspect ratio of the video.
|
||
AspectRatio *float32 `json:"aspectRatio,omitempty"`
|
||
// Number of audio channels.
|
||
AudioChannels *int `json:"audioChannels,omitempty"`
|
||
DisplayOffset *int `json:"displayOffset,omitempty"`
|
||
// Audio codec used.
|
||
AudioCodec *string `json:"audioCodec,omitempty"`
|
||
// Video codec used.
|
||
VideoCodec *string `json:"videoCodec,omitempty"`
|
||
// Video resolution (e.g., 4k).
|
||
VideoResolution *string `json:"videoResolution,omitempty"`
|
||
// Container format of the media.
|
||
Container *string `json:"container,omitempty"`
|
||
// Frame rate of the video. Values found include NTSC, PAL, 24p
|
||
//
|
||
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
|
||
// Video profile (e.g., main 10).
|
||
VideoProfile *string `json:"videoProfile,omitempty"`
|
||
// Indicates whether voice activity is detected.
|
||
HasVoiceActivity *bool `json:"hasVoiceActivity,omitempty"`
|
||
// The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||
AudioProfile *string `json:"audioProfile,omitempty"`
|
||
// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||
OptimizedForStreaming *GetMediaMetaDataOptimizedForStreaming `json:"optimizedForStreaming,omitempty"`
|
||
// Indicates whether the media has 64-bit offsets.
|
||
// This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
|
||
//
|
||
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
|
||
Part []GetMediaMetaDataPart `json:"Part,omitempty"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetID() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetDuration() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Duration
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetBitrate() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Bitrate
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetWidth() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Width
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetHeight() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Height
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetAspectRatio() *float32 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AspectRatio
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetAudioChannels() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AudioChannels
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetDisplayOffset() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.DisplayOffset
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetAudioCodec() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AudioCodec
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetVideoCodec() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.VideoCodec
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetVideoResolution() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.VideoResolution
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetContainer() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Container
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetVideoFrameRate() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.VideoFrameRate
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetVideoProfile() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.VideoProfile
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetHasVoiceActivity() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.HasVoiceActivity
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetAudioProfile() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AudioProfile
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetOptimizedForStreaming() *GetMediaMetaDataOptimizedForStreaming {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.OptimizedForStreaming
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetHas64bitOffsets() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Has64bitOffsets
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMedia) GetPart() []GetMediaMetaDataPart {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Part
|
||
}
|
||
|
||
// GetMediaMetaDataGenre - The filter query string for similar items.
|
||
type GetMediaMetaDataGenre struct {
|
||
// The unique identifier for the genre.
|
||
// NOTE: This is different for each Plex server and is not globally unique.
|
||
//
|
||
ID int `json:"id"`
|
||
// The genre name of this media-item
|
||
//
|
||
Tag string `json:"tag"`
|
||
Filter string `json:"filter"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataGenre) GetID() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataGenre) GetTag() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Tag
|
||
}
|
||
|
||
func (g *GetMediaMetaDataGenre) GetFilter() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Filter
|
||
}
|
||
|
||
// GetMediaMetaDataCountry - The filter query string for country media items.
|
||
type GetMediaMetaDataCountry struct {
|
||
// The unique identifier for the country.
|
||
// NOTE: This is different for each Plex server and is not globally unique.
|
||
//
|
||
ID int `json:"id"`
|
||
// The country of origin of this media item
|
||
Tag string `json:"tag"`
|
||
Filter string `json:"filter"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataCountry) GetID() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataCountry) GetTag() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Tag
|
||
}
|
||
|
||
func (g *GetMediaMetaDataCountry) GetFilter() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Filter
|
||
}
|
||
|
||
type GetMediaMetaDataDirector struct {
|
||
// Unique identifier for the director.
|
||
ID int `json:"id"`
|
||
// The role of Director
|
||
Tag string `json:"tag"`
|
||
// The filter string used to query this director.
|
||
Filter string `json:"filter"`
|
||
// A unique 24-character hexadecimal key associated with the director's tag, used for internal identification.
|
||
TagKey string `json:"tagKey"`
|
||
// The absolute URL of the thumbnail image for the director.
|
||
Thumb *string `json:"thumb,omitempty"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataDirector) GetID() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataDirector) GetTag() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Tag
|
||
}
|
||
|
||
func (g *GetMediaMetaDataDirector) GetFilter() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Filter
|
||
}
|
||
|
||
func (g *GetMediaMetaDataDirector) GetTagKey() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.TagKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataDirector) GetThumb() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Thumb
|
||
}
|
||
|
||
type GetMediaMetaDataWriter struct {
|
||
// Unique identifier for the writer.
|
||
ID int `json:"id"`
|
||
// The role of Writer
|
||
Tag string `json:"tag"`
|
||
// The filter string used to query this writer.
|
||
Filter string `json:"filter"`
|
||
// The absolute URL of the thumbnail image for the writer.
|
||
Thumb *string `json:"thumb,omitempty"`
|
||
// A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification.
|
||
TagKey *string `json:"tagKey,omitempty"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataWriter) GetID() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataWriter) GetTag() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Tag
|
||
}
|
||
|
||
func (g *GetMediaMetaDataWriter) GetFilter() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Filter
|
||
}
|
||
|
||
func (g *GetMediaMetaDataWriter) GetThumb() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Thumb
|
||
}
|
||
|
||
func (g *GetMediaMetaDataWriter) GetTagKey() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.TagKey
|
||
}
|
||
|
||
type GetMediaMetaDataProducer struct {
|
||
// The unique role identifier.
|
||
ID int64 `json:"id"`
|
||
// The filter string for the role.
|
||
Filter string `json:"filter"`
|
||
// The actor's name.
|
||
Tag string `json:"tag"`
|
||
// A key associated with the actor tag.
|
||
TagKey string `json:"tagKey"`
|
||
// The character name or role.
|
||
Role *string `json:"role,omitempty"`
|
||
// URL for the role thumbnail image.
|
||
Thumb *string `json:"thumb,omitempty"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataProducer) GetID() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataProducer) GetFilter() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Filter
|
||
}
|
||
|
||
func (g *GetMediaMetaDataProducer) GetTag() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Tag
|
||
}
|
||
|
||
func (g *GetMediaMetaDataProducer) GetTagKey() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.TagKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataProducer) GetRole() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Role
|
||
}
|
||
|
||
func (g *GetMediaMetaDataProducer) GetThumb() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Thumb
|
||
}
|
||
|
||
type GetMediaMetaDataRole struct {
|
||
// The unique identifier for the role.
|
||
// NOTE: This is different for each Plex server and is not globally unique.
|
||
//
|
||
ID int `json:"id"`
|
||
// The display tag for the actor (typically the actor's name).
|
||
Tag string `json:"tag"`
|
||
// The role played by the actor in the media item.
|
||
Role *string `json:"role,omitempty"`
|
||
// The filter string used to query this actor. For example, it may indicate that this is an actor with a given key.
|
||
Filter string `json:"filter"`
|
||
// A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification.
|
||
// NOTE: This is globally unique across all Plex Servers.
|
||
//
|
||
TagKey string `json:"tagKey"`
|
||
// The absolute URL of the thumbnail image for the actor.
|
||
Thumb *string `json:"thumb,omitempty"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRole) GetID() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRole) GetTag() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Tag
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRole) GetRole() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Role
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRole) GetFilter() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Filter
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRole) GetTagKey() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.TagKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRole) GetThumb() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Thumb
|
||
}
|
||
|
||
type GetMediaMetaDataRatings struct {
|
||
// The image or reference for the rating.
|
||
Image string `json:"image"`
|
||
// The rating value.
|
||
Value float32 `json:"value"`
|
||
// The type of rating (e.g., audience, critic).
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRatings) GetImage() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Image
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRatings) GetValue() float32 {
|
||
if g == nil {
|
||
return 0.0
|
||
}
|
||
return g.Value
|
||
}
|
||
|
||
func (g *GetMediaMetaDataRatings) GetType() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Type
|
||
}
|
||
|
||
type GetMediaMetaDataSimilar struct {
|
||
// The unique similar item identifier.
|
||
ID int64 `json:"id"`
|
||
// The filter string for similar items.
|
||
Filter string `json:"filter"`
|
||
// The tag or title of the similar content.
|
||
Tag string `json:"tag"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataSimilar) GetID() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataSimilar) GetFilter() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Filter
|
||
}
|
||
|
||
func (g *GetMediaMetaDataSimilar) GetTag() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Tag
|
||
}
|
||
|
||
type GetMediaMetaDataLocation struct {
|
||
// The file path for the location.
|
||
Path string `json:"path"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataLocation) GetPath() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Path
|
||
}
|
||
|
||
// GetMediaMetaDataChapter - The thumbnail for the chapter
|
||
type GetMediaMetaDataChapter struct {
|
||
ID int64 `json:"id"`
|
||
Filter string `json:"filter"`
|
||
Index int64 `json:"index"`
|
||
StartTimeOffset int64 `json:"startTimeOffset"`
|
||
EndTimeOffset int64 `json:"endTimeOffset"`
|
||
Thumb string `json:"thumb"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataChapter) GetID() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataChapter) GetFilter() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Filter
|
||
}
|
||
|
||
func (g *GetMediaMetaDataChapter) GetIndex() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.Index
|
||
}
|
||
|
||
func (g *GetMediaMetaDataChapter) GetStartTimeOffset() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.StartTimeOffset
|
||
}
|
||
|
||
func (g *GetMediaMetaDataChapter) GetEndTimeOffset() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.EndTimeOffset
|
||
}
|
||
|
||
func (g *GetMediaMetaDataChapter) GetThumb() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Thumb
|
||
}
|
||
|
||
// GetMediaMetaDataAttributes - Attributes associated with the marker.
|
||
type GetMediaMetaDataAttributes struct {
|
||
// The identifier for the attributes.
|
||
ID int64 `json:"id"`
|
||
// The version number of the marker attributes.
|
||
Version *int64 `json:"version,omitempty"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataAttributes) GetID() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataAttributes) GetVersion() *int64 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Version
|
||
}
|
||
|
||
// GetMediaMetaDataMarker - The final status of the marker
|
||
type GetMediaMetaDataMarker struct {
|
||
ID int64 `json:"id"`
|
||
Type string `json:"type"`
|
||
StartTimeOffset int64 `json:"startTimeOffset"`
|
||
EndTimeOffset int64 `json:"endTimeOffset"`
|
||
Final *bool `json:"final,omitempty"`
|
||
// Attributes associated with the marker.
|
||
Attributes *GetMediaMetaDataAttributes `json:"Attributes,omitempty"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMarker) GetID() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMarker) GetType() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Type
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMarker) GetStartTimeOffset() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.StartTimeOffset
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMarker) GetEndTimeOffset() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.EndTimeOffset
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMarker) GetFinal() *bool {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Final
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMarker) GetAttributes() *GetMediaMetaDataAttributes {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Attributes
|
||
}
|
||
|
||
type GetMediaMetaDataExtras struct {
|
||
// The size of the extras.
|
||
Size *int64 `json:"size,omitempty"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataExtras) GetSize() *int64 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Size
|
||
}
|
||
|
||
// GetMediaMetaDataMetadata - Unknown
|
||
type GetMediaMetaDataMetadata struct {
|
||
// The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API.
|
||
RatingKey string `json:"ratingKey"`
|
||
// The unique key for the media item.
|
||
Key string `json:"key"`
|
||
// The globally unique identifier for the media item.
|
||
GUID string `json:"guid"`
|
||
// A URL‐friendly version of the media title.
|
||
Slug string `json:"slug"`
|
||
// The studio that produced the media item.
|
||
Studio *string `json:"studio,omitempty"`
|
||
Type GetMediaMetaDataType `json:"type"`
|
||
// The title of the media item.
|
||
Title string `json:"title"`
|
||
// The sort title used for ordering media items.
|
||
TitleSort string `json:"titleSort"`
|
||
// The content rating for the media item.
|
||
ContentRating *string `json:"contentRating,omitempty"`
|
||
// A synopsis of the media item.
|
||
Summary string `json:"summary"`
|
||
// The critic rating for the media item.
|
||
Rating float32 `json:"rating"`
|
||
// The audience rating for the media item.
|
||
AudienceRating float64 `json:"audienceRating"`
|
||
// The release year of the media item.
|
||
Year *int `json:"year,omitempty"`
|
||
// A brief tagline for the media item.
|
||
Tagline string `json:"tagline"`
|
||
// The thumbnail image URL for the media item.
|
||
Thumb string `json:"thumb"`
|
||
// The art image URL for the media item.
|
||
Art string `json:"art"`
|
||
// The theme URL for the media item.
|
||
Theme string `json:"theme"`
|
||
// The index position of the media item.
|
||
Index int `json:"index"`
|
||
// The number of leaf items (end nodes) under this media item.
|
||
LeafCount *int `json:"leafCount,omitempty"`
|
||
// The number of leaf items that have been viewed.
|
||
ViewedLeafCount *int `json:"viewedLeafCount,omitempty"`
|
||
// The number of child items associated with this media item.
|
||
ChildCount int `json:"childCount"`
|
||
// The total number of seasons (for TV shows).
|
||
SeasonCount int `json:"seasonCount"`
|
||
// The duration of the media item in milliseconds.
|
||
Duration int `json:"duration"`
|
||
// The original release date of the media item.
|
||
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
|
||
AddedAt int64 `json:"addedAt"`
|
||
// Unix epoch datetime in seconds
|
||
UpdatedAt *int64 `json:"updatedAt,omitempty"`
|
||
// The URL for the audience rating image.
|
||
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
|
||
// The source from which chapter data is derived.
|
||
ChapterSource *string `json:"chapterSource,omitempty"`
|
||
// The primary extra key associated with this media item.
|
||
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
|
||
// The original title of the media item (if different).
|
||
OriginalTitle *string `json:"originalTitle,omitempty"`
|
||
// The rating key of the parent media item.
|
||
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
|
||
// The rating key of the grandparent media item.
|
||
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
|
||
// The GUID of the parent media item.
|
||
ParentGUID *string `json:"parentGuid,omitempty"`
|
||
// The GUID of the grandparent media item.
|
||
GrandparentGUID *string `json:"grandparentGuid,omitempty"`
|
||
// The slug for the grandparent media item.
|
||
GrandparentSlug *string `json:"grandparentSlug,omitempty"`
|
||
// The key of the grandparent media item.
|
||
GrandparentKey *string `json:"grandparentKey,omitempty"`
|
||
// The key of the parent media item.
|
||
ParentKey *string `json:"parentKey,omitempty"`
|
||
// The title of the grandparent media item.
|
||
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
|
||
// The thumbnail URL for the grandparent media item.
|
||
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
|
||
// The theme URL for the grandparent media item.
|
||
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
|
||
// The art URL for the grandparent media item.
|
||
GrandparentArt *string `json:"grandparentArt,omitempty"`
|
||
// The title of the parent media item.
|
||
ParentTitle *string `json:"parentTitle,omitempty"`
|
||
// The index position of the parent media item.
|
||
ParentIndex *int `json:"parentIndex,omitempty"`
|
||
// The thumbnail URL for the parent media item.
|
||
ParentThumb *string `json:"parentThumb,omitempty"`
|
||
// The URL for the rating image.
|
||
RatingImage *string `json:"ratingImage,omitempty"`
|
||
// The number of times this media item has been viewed.
|
||
ViewCount *int `json:"viewCount,omitempty"`
|
||
// The current playback offset (in milliseconds).
|
||
ViewOffset *int `json:"viewOffset,omitempty"`
|
||
// The number of times this media item has been skipped.
|
||
SkipCount *int `json:"skipCount,omitempty"`
|
||
// A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip.
|
||
Subtype *string `json:"subtype,omitempty"`
|
||
// The Unix timestamp representing the last time the item was rated.
|
||
LastRatedAt *int64 `json:"lastRatedAt,omitempty"`
|
||
// The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available).
|
||
CreatedAtAccuracy *string `json:"createdAtAccuracy,omitempty"`
|
||
// The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.
|
||
CreatedAtTZOffset *string `json:"createdAtTZOffset,omitempty"`
|
||
// Unix timestamp for when the media item was last viewed.
|
||
LastViewedAt *int `json:"lastViewedAt,omitempty"`
|
||
// The rating provided by a user for the item. This value is expressed as a decimal number.
|
||
UserRating *float32 `json:"userRating,omitempty"`
|
||
Image []GetMediaMetaDataImage `json:"Image,omitempty"`
|
||
UltraBlurColors *GetMediaMetaDataUltraBlurColors `json:"UltraBlurColors,omitempty"`
|
||
// The identifier for the library section.
|
||
LibrarySectionID *int64 `json:"librarySectionID,omitempty"`
|
||
// The title of the library section.
|
||
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
|
||
// The key corresponding to the library section.
|
||
LibrarySectionKey *string `json:"librarySectionKey,omitempty"`
|
||
Guids []GetMediaMetaDataGuids `json:"Guid,omitempty"`
|
||
Media []GetMediaMetaDataMedia `json:"Media,omitempty"`
|
||
Genre []GetMediaMetaDataGenre `json:"Genre,omitempty"`
|
||
Country []GetMediaMetaDataCountry `json:"Country,omitempty"`
|
||
Director []GetMediaMetaDataDirector `json:"Director,omitempty"`
|
||
Writer []GetMediaMetaDataWriter `json:"Writer,omitempty"`
|
||
Producer []GetMediaMetaDataProducer `json:"Producer,omitempty"`
|
||
Role []GetMediaMetaDataRole `json:"Role,omitempty"`
|
||
Ratings []GetMediaMetaDataRatings `json:"Rating,omitempty"`
|
||
Similar []GetMediaMetaDataSimilar `json:"Similar,omitempty"`
|
||
Location []GetMediaMetaDataLocation `json:"Location,omitempty"`
|
||
Chapter []GetMediaMetaDataChapter `json:"Chapter,omitempty"`
|
||
Marker []GetMediaMetaDataMarker `json:"Marker,omitempty"`
|
||
Extras *GetMediaMetaDataExtras `json:"Extras,omitempty"`
|
||
}
|
||
|
||
func (g GetMediaMetaDataMetadata) MarshalJSON() ([]byte, error) {
|
||
return utils.MarshalJSON(g, "", false)
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) UnmarshalJSON(data []byte) error {
|
||
if err := utils.UnmarshalJSON(data, &g, "", false, []string{"ratingKey", "key", "guid", "slug", "type", "title", "titleSort", "summary", "rating", "audienceRating", "tagline", "thumb", "art", "theme", "index", "childCount", "seasonCount", "duration", "addedAt"}); err != nil {
|
||
return err
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetRatingKey() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.RatingKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetKey() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Key
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGUID() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.GUID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetSlug() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Slug
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetStudio() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Studio
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetType() GetMediaMetaDataType {
|
||
if g == nil {
|
||
return GetMediaMetaDataType("")
|
||
}
|
||
return g.Type
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetTitle() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Title
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetTitleSort() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.TitleSort
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetContentRating() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ContentRating
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetSummary() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Summary
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetRating() float32 {
|
||
if g == nil {
|
||
return 0.0
|
||
}
|
||
return g.Rating
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetAudienceRating() float64 {
|
||
if g == nil {
|
||
return 0.0
|
||
}
|
||
return g.AudienceRating
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetYear() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Year
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetTagline() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Tagline
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetThumb() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Thumb
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetArt() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Art
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetTheme() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Theme
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetIndex() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.Index
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetLeafCount() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LeafCount
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetViewedLeafCount() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ViewedLeafCount
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetChildCount() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.ChildCount
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetSeasonCount() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.SeasonCount
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetDuration() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.Duration
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetOriginallyAvailableAt() *types.Date {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.OriginallyAvailableAt
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetAddedAt() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.AddedAt
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetUpdatedAt() *int64 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.UpdatedAt
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetAudienceRatingImage() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.AudienceRatingImage
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetChapterSource() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ChapterSource
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetPrimaryExtraKey() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.PrimaryExtraKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetOriginalTitle() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.OriginalTitle
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetParentRatingKey() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ParentRatingKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGrandparentRatingKey() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.GrandparentRatingKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetParentGUID() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ParentGUID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGrandparentGUID() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.GrandparentGUID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGrandparentSlug() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.GrandparentSlug
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGrandparentKey() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.GrandparentKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetParentKey() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ParentKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGrandparentTitle() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.GrandparentTitle
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGrandparentThumb() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.GrandparentThumb
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGrandparentTheme() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.GrandparentTheme
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGrandparentArt() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.GrandparentArt
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetParentTitle() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ParentTitle
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetParentIndex() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ParentIndex
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetParentThumb() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ParentThumb
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetRatingImage() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.RatingImage
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetViewCount() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ViewCount
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetViewOffset() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.ViewOffset
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetSkipCount() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.SkipCount
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetSubtype() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Subtype
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetLastRatedAt() *int64 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LastRatedAt
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetCreatedAtAccuracy() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.CreatedAtAccuracy
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetCreatedAtTZOffset() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.CreatedAtTZOffset
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetLastViewedAt() *int {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LastViewedAt
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetUserRating() *float32 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.UserRating
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetImage() []GetMediaMetaDataImage {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Image
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetUltraBlurColors() *GetMediaMetaDataUltraBlurColors {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.UltraBlurColors
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetLibrarySectionID() *int64 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LibrarySectionID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetLibrarySectionTitle() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LibrarySectionTitle
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetLibrarySectionKey() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LibrarySectionKey
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGuids() []GetMediaMetaDataGuids {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Guids
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetMedia() []GetMediaMetaDataMedia {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Media
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetGenre() []GetMediaMetaDataGenre {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Genre
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetCountry() []GetMediaMetaDataCountry {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Country
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetDirector() []GetMediaMetaDataDirector {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Director
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetWriter() []GetMediaMetaDataWriter {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Writer
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetProducer() []GetMediaMetaDataProducer {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Producer
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetRole() []GetMediaMetaDataRole {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Role
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetRatings() []GetMediaMetaDataRatings {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Ratings
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetSimilar() []GetMediaMetaDataSimilar {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Similar
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetLocation() []GetMediaMetaDataLocation {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Location
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetChapter() []GetMediaMetaDataChapter {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Chapter
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetMarker() []GetMediaMetaDataMarker {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Marker
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMetadata) GetExtras() *GetMediaMetaDataExtras {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Extras
|
||
}
|
||
|
||
type GetMediaMetaDataMediaContainer struct {
|
||
// Number of media items returned in this response.
|
||
Size int `json:"size"`
|
||
// Indicates whether syncing is allowed.
|
||
AllowSync bool `json:"allowSync"`
|
||
// An plugin identifier for the media container.
|
||
Identifier string `json:"identifier"`
|
||
// The unique identifier for the library section.
|
||
LibrarySectionID *int64 `json:"librarySectionID,omitempty"`
|
||
// The title of the library section.
|
||
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
|
||
// The universally unique identifier for the library section.
|
||
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
|
||
// The prefix used for media tag resource paths.
|
||
MediaTagPrefix string `json:"mediaTagPrefix"`
|
||
// The version number for media tags.
|
||
MediaTagVersion int64 `json:"mediaTagVersion"`
|
||
// An array of metadata items.
|
||
Metadata []GetMediaMetaDataMetadata `json:"Metadata"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMediaContainer) GetSize() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.Size
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMediaContainer) GetAllowSync() bool {
|
||
if g == nil {
|
||
return false
|
||
}
|
||
return g.AllowSync
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMediaContainer) GetIdentifier() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.Identifier
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMediaContainer) GetLibrarySectionID() *int64 {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LibrarySectionID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMediaContainer) GetLibrarySectionTitle() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LibrarySectionTitle
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMediaContainer) GetLibrarySectionUUID() *string {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.LibrarySectionUUID
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMediaContainer) GetMediaTagPrefix() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.MediaTagPrefix
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMediaContainer) GetMediaTagVersion() int64 {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.MediaTagVersion
|
||
}
|
||
|
||
func (g *GetMediaMetaDataMediaContainer) GetMetadata() []GetMediaMetaDataMetadata {
|
||
if g == nil {
|
||
return []GetMediaMetaDataMetadata{}
|
||
}
|
||
return g.Metadata
|
||
}
|
||
|
||
// GetMediaMetaDataResponseBody - The metadata of the library item.
|
||
type GetMediaMetaDataResponseBody struct {
|
||
MediaContainer *GetMediaMetaDataMediaContainer `json:"MediaContainer,omitempty"`
|
||
}
|
||
|
||
func (g *GetMediaMetaDataResponseBody) GetMediaContainer() *GetMediaMetaDataMediaContainer {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.MediaContainer
|
||
}
|
||
|
||
type GetMediaMetaDataResponse struct {
|
||
// HTTP response content type for this operation
|
||
ContentType string
|
||
// HTTP response status code for this operation
|
||
StatusCode int
|
||
// Raw HTTP response; suitable for custom response parsing
|
||
RawResponse *http.Response
|
||
// The metadata of the library item.
|
||
Object *GetMediaMetaDataResponseBody
|
||
}
|
||
|
||
func (g *GetMediaMetaDataResponse) GetContentType() string {
|
||
if g == nil {
|
||
return ""
|
||
}
|
||
return g.ContentType
|
||
}
|
||
|
||
func (g *GetMediaMetaDataResponse) GetStatusCode() int {
|
||
if g == nil {
|
||
return 0
|
||
}
|
||
return g.StatusCode
|
||
}
|
||
|
||
func (g *GetMediaMetaDataResponse) GetRawResponse() *http.Response {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.RawResponse
|
||
}
|
||
|
||
func (g *GetMediaMetaDataResponse) GetObject() *GetMediaMetaDataResponseBody {
|
||
if g == nil {
|
||
return nil
|
||
}
|
||
return g.Object
|
||
}
|