initial prototype complete, starting to package for docker
This commit is contained in:
188
plex_models.go
Normal file
188
plex_models.go
Normal file
@@ -0,0 +1,188 @@
|
||||
package main
|
||||
|
||||
type ActiveSessions struct {
|
||||
MediaContainer struct {
|
||||
Size int `json:"size"`
|
||||
Metadata []struct {
|
||||
AddedAt int `json:"addedAt"`
|
||||
Art string `json:"art"`
|
||||
Duration int `json:"duration"`
|
||||
GrandparentArt string `json:"grandparentArt"`
|
||||
GrandparentGUID string `json:"grandparentGuid"`
|
||||
GrandparentKey string `json:"grandparentKey"`
|
||||
GrandparentRatingKey string `json:"grandparentRatingKey"`
|
||||
GrandparentThumb string `json:"grandparentThumb"`
|
||||
GrandparentTitle string `json:"grandparentTitle"`
|
||||
GUID string `json:"guid"`
|
||||
Key string `json:"key"`
|
||||
LastViewedAt int `json:"lastViewedAt"`
|
||||
LibrarySectionID string `json:"librarySectionID"`
|
||||
LibrarySectionKey string `json:"librarySectionKey"`
|
||||
LibrarySectionTitle string `json:"librarySectionTitle"`
|
||||
MusicAnalysisVersion string `json:"musicAnalysisVersion"`
|
||||
OriginalTitle string `json:"originalTitle"`
|
||||
ParentGUID string `json:"parentGuid"`
|
||||
ParentIndex int `json:"parentIndex"`
|
||||
ParentKey string `json:"parentKey"`
|
||||
ParentRatingKey string `json:"parentRatingKey"`
|
||||
ParentTitle string `json:"parentTitle"`
|
||||
RatingKey string `json:"ratingKey"`
|
||||
SessionKey string `json:"sessionKey"`
|
||||
Title string `json:"title"`
|
||||
Type string `json:"type"`
|
||||
ViewOffset int `json:"viewOffset"`
|
||||
Media []struct {
|
||||
AudioChannels int `json:"audioChannels"`
|
||||
AudioCodec string `json:"audioCodec"`
|
||||
Bitrate int `json:"bitrate"`
|
||||
Container string `json:"container"`
|
||||
Duration int `json:"duration"`
|
||||
ID string `json:"id"`
|
||||
Part []struct {
|
||||
Container string `json:"container"`
|
||||
Duration int `json:"duration"`
|
||||
File string `json:"file"`
|
||||
ID string `json:"id"`
|
||||
Key string `json:"key"`
|
||||
Size int `json:"size"`
|
||||
Stream []struct {
|
||||
AlbumGain string `json:"albumGain"`
|
||||
AlbumPeak string `json:"albumPeak"`
|
||||
AlbumRange string `json:"albumRange"`
|
||||
AudioChannelLayout string `json:"audioChannelLayout"`
|
||||
Bitrate int `json:"bitrate"`
|
||||
Channels int `json:"channels"`
|
||||
Codec string `json:"codec"`
|
||||
DisplayTitle string `json:"displayTitle"`
|
||||
ExtendedDisplayTitle string `json:"extendedDisplayTitle"`
|
||||
Gain string `json:"gain"`
|
||||
ID string `json:"id"`
|
||||
Index int `json:"index"`
|
||||
Loudness string `json:"loudness"`
|
||||
Lra string `json:"lra"`
|
||||
Peak string `json:"peak"`
|
||||
SamplingRate int `json:"samplingRate"`
|
||||
Selected bool `json:"selected"`
|
||||
StreamType int `json:"streamType"`
|
||||
} `json:"Stream"`
|
||||
} `json:"Part"`
|
||||
} `json:"Media"`
|
||||
User struct {
|
||||
ID string `json:"id"`
|
||||
Thumb string `json:"thumb"`
|
||||
Title string `json:"title"`
|
||||
} `json:"User"`
|
||||
Player struct {
|
||||
Address string `json:"address"`
|
||||
Device string `json:"device"`
|
||||
MachineIdentifier string `json:"machineIdentifier"`
|
||||
Platform string `json:"platform"`
|
||||
PlatformVersion string `json:"platformVersion"`
|
||||
Product string `json:"product"`
|
||||
Profile string `json:"profile"`
|
||||
RemotePublicAddress string `json:"remotePublicAddress"`
|
||||
State string `json:"state"`
|
||||
Title string `json:"title"`
|
||||
Version string `json:"version"`
|
||||
Local bool `json:"local"`
|
||||
Relayed bool `json:"relayed"`
|
||||
Secure bool `json:"secure"`
|
||||
UserID int `json:"userID"`
|
||||
} `json:"Player"`
|
||||
} `json:"Metadata"`
|
||||
} `json:"MediaContainer"`
|
||||
}
|
||||
|
||||
type LibraryAll struct {
|
||||
MediaContainer struct {
|
||||
Size int `json:"size"`
|
||||
AllowSync bool `json:"allowSync"`
|
||||
Art string `json:"art"`
|
||||
Identifier string `json:"identifier"`
|
||||
LibrarySectionID int `json:"librarySectionID"`
|
||||
LibrarySectionTitle string `json:"librarySectionTitle"`
|
||||
LibrarySectionUUID string `json:"librarySectionUUID"`
|
||||
MediaTagPrefix string `json:"mediaTagPrefix"`
|
||||
MediaTagVersion int `json:"mediaTagVersion"`
|
||||
Thumb string `json:"thumb"`
|
||||
Title1 string `json:"title1"`
|
||||
Title2 string `json:"title2"`
|
||||
ViewGroup string `json:"viewGroup"`
|
||||
ViewMode int `json:"viewMode"`
|
||||
Metadata []struct {
|
||||
RatingKey string `json:"ratingKey"`
|
||||
Key string `json:"key"`
|
||||
GUID string `json:"guid"`
|
||||
Studio string `json:"studio,omitempty"`
|
||||
Type string `json:"type"`
|
||||
Title string `json:"title"`
|
||||
ContentRating string `json:"contentRating,omitempty"`
|
||||
Summary string `json:"summary"`
|
||||
Rating float64 `json:"rating,omitempty"`
|
||||
AudienceRating float64 `json:"audienceRating,omitempty"`
|
||||
Year int `json:"year,omitempty"`
|
||||
Tagline string `json:"tagline,omitempty"`
|
||||
Thumb string `json:"thumb"`
|
||||
Art string `json:"art,omitempty"`
|
||||
Duration int `json:"duration"`
|
||||
OriginallyAvailableAt string `json:"originallyAvailableAt,omitempty"`
|
||||
AddedAt int `json:"addedAt"`
|
||||
UpdatedAt int `json:"updatedAt"`
|
||||
AudienceRatingImage string `json:"audienceRatingImage,omitempty"`
|
||||
ChapterSource string `json:"chapterSource,omitempty"`
|
||||
PrimaryExtraKey string `json:"primaryExtraKey,omitempty"`
|
||||
RatingImage string `json:"ratingImage,omitempty"`
|
||||
Media []struct {
|
||||
ID int `json:"id"`
|
||||
Duration int `json:"duration"`
|
||||
Bitrate int `json:"bitrate"`
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
AspectRatio float64 `json:"aspectRatio"`
|
||||
AudioChannels int `json:"audioChannels"`
|
||||
AudioCodec string `json:"audioCodec"`
|
||||
VideoCodec string `json:"videoCodec"`
|
||||
VideoResolution string `json:"videoResolution"`
|
||||
Container string `json:"container"`
|
||||
VideoFrameRate string `json:"videoFrameRate"`
|
||||
OptimizedForStreaming int `json:"optimizedForStreaming"`
|
||||
Has64BitOffsets bool `json:"has64bitOffsets"`
|
||||
VideoProfile string `json:"videoProfile"`
|
||||
Part []struct {
|
||||
ID int `json:"id"`
|
||||
Key string `json:"key"`
|
||||
Duration int `json:"duration"`
|
||||
File string `json:"file"`
|
||||
Size int `json:"size"`
|
||||
Container string `json:"container"`
|
||||
Has64BitOffsets bool `json:"has64bitOffsets"`
|
||||
OptimizedForStreaming bool `json:"optimizedForStreaming"`
|
||||
VideoProfile string `json:"videoProfile"`
|
||||
} `json:"Part"`
|
||||
} `json:"Media"`
|
||||
Genre []struct {
|
||||
Tag string `json:"tag"`
|
||||
} `json:"Genre,omitempty"`
|
||||
Country []struct {
|
||||
Tag string `json:"tag"`
|
||||
} `json:"Country,omitempty"`
|
||||
Director []struct {
|
||||
Tag string `json:"tag"`
|
||||
} `json:"Director,omitempty"`
|
||||
Writer []struct {
|
||||
Tag string `json:"tag"`
|
||||
} `json:"Writer,omitempty"`
|
||||
Role []struct {
|
||||
Tag string `json:"tag"`
|
||||
} `json:"Role,omitempty"`
|
||||
TitleSort string `json:"titleSort,omitempty"`
|
||||
ViewCount int `json:"viewCount,omitempty"`
|
||||
LastViewedAt int `json:"lastViewedAt,omitempty"`
|
||||
SkipCount int `json:"skipCount,omitempty"`
|
||||
OriginalTitle string `json:"originalTitle,omitempty"`
|
||||
ViewOffset int `json:"viewOffset,omitempty"`
|
||||
CreatedAtAccuracy string `json:"createdAtAccuracy,omitempty"`
|
||||
CreatedAtTZOffset string `json:"createdAtTZOffset,omitempty"`
|
||||
} `json:"Metadata"`
|
||||
} `json:"MediaContainer"`
|
||||
}
|
Reference in New Issue
Block a user