123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- package plexapi
- import "encoding/xml"
- // Video struct
- type Video struct {
- server *Server
- Keys []KeyInfo `xml:"-"`
- Paths []string `xml:"-"`
- FID string `xml:"-"`
- XMLName xml.Name `xml:"Video"`
- GUID string `xml:"guid,attr"`
- RatingKey string `xml:"ratingKey,attr"`
- Key string `xml:"key,attr"`
- Studio string `xml:"studio,attr"`
- Type string `xml:"type,attr"`
- Title string `xml:"title,attr"`
- TitleSort string `xml:"titleSort,attr"`
- ContentRating string `xml:"contentRating,attr"`
- Summary string `xml:"summary,attr"`
- Rating string `xml:"rating,attr"`
- ViewCount string `xml:"viewCount,attr"`
- ViewOffset string `xml:"viewOffset,attr"`
- LastViewedAt string `xml:"lastViewedAt,attr"`
- Year string `xml:"year,attr"`
- Tagline string `xml:"tagline,attr"`
- Thumb string `xml:"thumb,attr"`
- Art string `xml:"art,attr"`
- Duration string `xml:"duration,attr"`
- OriginallyAvailableAt string `xml:"originallyAvailableAt,attr"`
- AddedAt string `xml:"addedAt,attr"`
- UpdatedAt string `xml:"updatedAt,attr"`
- ChapterSource string `xml:"chapterSource,attr"`
- Media Media `xml:"Media"`
- Genre Genre `xml:"Genre"`
- Writer Writer `xml:"Writer"`
- Country Country `xml:"Country"`
- Role Role `xml:"Role"`
- Director Director `xml:"Director"`
- }
- // Media struct
- type Media struct {
- XMLName xml.Name `xml:"Media"`
- VideoResolution string `xml:"videoResolution,attr"`
- ID string `xml:"id,attr"`
- Duration string `xml:"duration,attr"`
- Bitrate string `xml:"bitrate,attr"`
- Width string `xml:"width,attr"`
- Height string `xml:"height,attr"`
- AspectRatio string `xml:"aspectRatio,attr"`
- AudioChannels string `xml:"audioChannels,attr"`
- AudioCodec string `xml:"audioCodec,attr"`
- VideoCodec string `xml:"videoCodec,attr"`
- Container string `xml:"container,attr"`
- VideoFrameRate string `xml:"videoFrameRate,attr"`
- VideoProfile string `xml:"videoProfile,attr"`
- Parts []Part `xml:"Part"`
- }
- // Part struct
- type Part struct {
- XMLName xml.Name `xml:"Part"`
- ID string `xml:"id,attr"`
- Key string `xml:"key,attr"`
- Duration string `xml:"duration,attr"`
- File string `xml:"file,attr"`
- Sizecontainer string `xml:"sizecontainer,attr"`
- DeepAnalysisVersion string `xml:"deepAnalysisVersion,attr"`
- RequiredBandwidths string `xml:"requiredBandwidths,attr"`
- VideoProfile string `xml:"videoProfile,attr"`
- }
- // Genre struct
- type Genre struct {
- XMLName xml.Name `xml:"Genre"`
- Tag string `xml:"tag,attr"`
- }
- // Writer struct
- type Writer struct {
- XMLName xml.Name `xml:"Writer"`
- Tag string `xml:"tag,attr"`
- }
- // Country struct
- type Country struct {
- XMLName xml.Name `xml:"Country"`
- Tag string `xml:"tag,attr"`
- }
- // Role struct
- type Role struct {
- XMLName xml.Name `xml:"Role"`
- Tag string `xml:"tag,attr"`
- }
- // Director struct
- type Director struct {
- XMLName xml.Name `xml:"Director"`
- Tag string `xml:"tag,attr"`
- }
- // Data struct
- type Data struct {
- Videos map[string]Video
- UpdatedAt map[string]int64
- }
- // GetServer func
- func (v *Video) GetServer() *Server {
- return v.server
- }
|