mbapi

package module
v0.0.0-...-b4ad2b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2015 License: MIT Imports: 16 Imported by: 0

README

mbapi

Go Implementation of the Mediabrowser Api

Documentation

Index

Constants

View Source
const MFILE = 0444
View Source
const Version = "1.0.0.0"

Variables

This section is empty.

Functions

func RenderQuery

func RenderQuery(query Query) (queryUrl string, err error)

RenderQuery creates a URL Path for a Query object, If you need a Query that is not Provied by this Package you can Create your own, look at query.go for Examles.

func RenderResponse

func RenderResponse(resp *http.Response, out Response) error

RenderResponse is basicly just a Wrapper around json.Unmarshal

Types

type AccessSchedule

type AccessSchedule struct {
	DayOfWeek string //) = ['Sunday' or 'Monday' or 'Tuesday' or 'Wednesday' or 'Thursday' or 'Friday' or 'Saturday' or 'Everyday' or 'Weekday' or 'Weekend'],
	StartHour float64
	EndHour   float64
}

type AuthenticationResult

type AuthenticationResult struct {
	User        UserDto
	SessionInfo SessionInfoDto
	AccessToken string
	ServerId    string
}

type Backend

type Backend struct {
	UserId string
	// contains filtered or unexported fields
}

Backend is the main Construct that hold information about a Mediabrowser Server. It manages Authentication and actually executing the Query

func NewBackend

func NewBackend(host string) *Backend

func (*Backend) EpisodeById

func (b *Backend) EpisodeById(id string) (*BaseItemDto, error)

func (*Backend) GetStreamReader

func (b *Backend) GetStreamReader(item *BaseItemDto) (*StreamReader, error)

func (*Backend) GetUsers

func (b *Backend) GetUsers() ([]UserDto, error)

func (*Backend) Login

func (b *Backend) Login(username, password string) error

Login Creates a LoginQuery and executes it the resulting AuthenticationResult is used to authenticate future Requests, this is probably the first Method you Call on a new Backend object.

func (*Backend) Movies

func (b *Backend) Movies() ([]BaseItemDto, error)

func (*Backend) NewRequest

func (b *Backend) NewRequest(query Query) (*http.Response, error)

NewRequest is the main Method of this Package. You get back the Complete http.Response because you to allow better control over what happens, Warps around "net/http" and manages the calls to the API

func (*Backend) NewStreamFile

func (b *Backend) NewStreamFile(i *BaseItemDto) (*StreamFile, error)

func (*Backend) SeasonById

func (b *Backend) SeasonById(id string) (*BaseItemDto, error)

func (*Backend) ShowById

func (b *Backend) ShowById(id string) (*BaseItemDto, error)

func (*Backend) TVShows

func (b *Backend) TVShows() ([]BaseItemDto, error)

type BaseItemDto

type BaseItemDto struct {
	Name                            string
	ServerId                        string
	Id                              string
	PlaylistItemId                  string
	DateCreated                     time.Time ////,optional
	DateLastMediaAdded              time.Time ////,optional
	ExtraType                       string    ////,optional) = ['Clip' or 'Trailer' or 'BehindTheScenes' or 'DeletedScene' or 'Interview' or 'Scene' or 'Sample' or 'ThemeSong' or 'ThemeVideo'],
	AirsBeforeSeasonNumber          int       ////,optional
	AirsAfterSeasonNumber           int       ////,optional
	AirsBeforeEpisodeNumber         int       ////,optional
	AbsoluteEpisodeNumber           int       ////,optional
	DisplaySpecialsWithSeasons      bool      ////,optional
	PreferredMetadataLanguage       string
	PreferredMetadataCountryCode    string
	AwardSummary                    string
	Metascore                       float32 //,optional
	IsUnidentified                  bool    //,optional
	AnimeSeriesIndex                int     //,optional
	SupportsSync                    bool    //,optional
	DvdSeasonNumber                 int     //,optional
	DvdEpisodeNumber                float32 //,optional
	SortName                        string
	ForcedSortName                  string
	Video3DFormat                   string    //,optional) = ['HalfSideBySide' or 'FullSideBySide' or 'FullTopAndBottom' or 'HalfTopAndBottom'],
	PremiereDate                    time.Time //,optional
	ExternalUrls                    []ExternalUrl
	MediaSources                    []MediaSourceInfo
	CriticRating                    float32 //,optional
	GameSystem                      string
	CriticRatingSummary             string
	MultiPartGameFiles              []string
	Path                            string
	OfficialRating                  string
	CustomRating                    string
	ChannelId                       string
	ChannelName                     string
	Overview                        string
	ShortOverview                   string
	TmdbCollectionName              string
	Taglines                        []string
	Genres                          []string
	SeriesGenres                    []string
	CommunityRating                 float32 //,optional
	VoteCount                       int     //,optional
	CumulativeRunTimeTicks          int64   //,optional
	OriginalRunTimeTicks            int64   //,optional
	RunTimeTicks                    int64   //,optional
	RecursiveUnplayedItemCount      int     //,optional
	PlayAccess                      string  //) = ['Full' or 'None'],
	AspectRatio                     string
	ProductionYear                  int  //,optional
	SeasonCount                     int  //,optional
	Players                         int  //,optional
	IsPlaceHolder                   bool //,optional
	IndexNumber                     int  //,optional
	IndexNumberEnd                  int  //,optional
	ParentIndexNumber               int  //,optional
	RemoteTrailers                  []MediaUrl
	SoundtrackIds                   []string
	IsHD                            bool //,optional
	IsFolder                        bool
	ParentId                        string
	Type                            string
	People                          []BaseItemPerson
	Studios                         []StudioDto
	ParentLogoItemId                string
	ParentBackdropItemId            string
	ParentBackdropImageTags         []string
	LocalTrailerCount               int //,optional
	UserData                        UserItemDataDto
	SeasonUserData                  UserItemDataDto
	RecursiveItemCount              int //,optional
	ChildCount                      int //,optional
	SeriesName                      string
	SeriesId                        string
	SeasonId                        string
	SpecialFeatureCount             int //,optional
	DisplayPreferencesId            string
	Status                          string //,optional) = ['Continuing' or 'Ended'],
	AirTime                         string
	AirDays                         []string
	IndexOptions                    []string
	Tags                            []string
	Keywords                        []string
	PrimaryImageAspectRatio         float64 //,optional
	OriginalPrimaryImageAspectRatio float64 //,optional
	Artists                         []string
	Album                           string
	CollectionType                  string
	DisplayOrder                    string
	AlbumId                         string
	AlbumPrimaryImageTag            string
	SeriesPrimaryImageTag           string
	AlbumArtist                     string
	SeasonName                      string
	MediaStreams                    []MediaStream
	VideoType                       string //,optional) = ['VideoFile' or 'Iso' or 'Dvd' or 'BluRay' or 'HdDvd'],
	DisplayMediaType                string
	PartCount                       int //,optional
	MediaSourceCount                int //,optional
	SupportsPlaylists               bool
	BackdropImageTags               []string
	ScreenshotImageTags             []string
	ParentLogoImageTag              string
	ParentArtItemId                 string
	ParentArtImageTag               string
	SeriesThumbImageTag             string
	SeriesStudio                    string
	ParentThumbItemId               string
	ParentThumbImageTag             string
	ParentPrimaryImageItemId        string
	ParentPrimaryImageTag           string
	Chapters                        []ChapterInfoDto
	LocationType                    string //) = ['FileSystem' or 'Remote' or 'Virtual' or 'Offline'],
	IsoType                         string //,optional) = ['Dvd' or 'BluRay'],
	MediaType                       string
	EndDate                         time.Time //,optional
	HomePageUrl                     string
	ProductionLocations             []string
	Budget                          float64 //,optional
	Revenue                         float64 //,optional
	MovieCount                      int     //,optional
	SeriesCount                     int     //,optional
	EpisodeCount                    int     //,optional
	GameCount                       int     //,optional
	SongCount                       int     //,optional
	AlbumCount                      int     //,optional
	MusicVideoCount                 int     //,optional
	LockData                        bool    //,optional
	Width                           int     //,optional
	Height                          int     //,optional
	CameraMake                      string
	CameraModel                     string
	Software                        string
	ExposureTime                    float64 //,optional
	FocalLength                     float64 //,optional
	ImageOrientation                string  //,optional) = ['TopLeft' or 'TopRight' or 'BottomRight' or 'BottomLeft' or 'LeftTop' or 'RightTop' or 'RightBottom' or 'LeftBottom'],
	Aperture                        float64 //,optional
	ShutterSpeed                    float64 //,optional
	Latitude                        float64 //,optional
	Longitude                       float64 //,optional
	Altitude                        float64 //,optional
	IsoSpeedRating                  int     //,optional
	CanResume                       bool
	ResumePositionTicks             int64
	BackdropCount                   int
	ScreenshotCount                 int
	HasBanner                       bool
	HasArtImage                     bool
	HasThumb                        bool
	HasPrimaryImage                 bool
	HasDiscImage                    bool
	HasBoxImage                     bool
	HasBoxRearImage                 bool
	HasMenuImage                    bool
	IsVideo                         bool
	IsAudio                         bool
	IsGame                          bool
	IsPerson                        bool
	IsRoot                          bool
	IsMusicGenre                    bool
	IsGameGenre                     bool
	IsGenre                         bool
	IsArtist                        bool
	IsAlbum                         bool
	IsStudio                        bool
}

type BaseItemInfo

type BaseItemInfo struct {
	Name                string
	Id                  string
	Type                string
	MediaType           string
	RunTimeTicks        int64 //, optional
	PrimaryImageTag     string
	PrimaryImageItemId  string
	LogoImageTag        string
	LogoItemId          string
	ThumbImageTag       string
	ThumbItemId         string
	BackdropImageTag    string
	BackdropItemId      string
	PremiereDate        time.Time //, optional
	ProductionYear      int       //, optional
	IndexNumber         int       //, optional
	IndexNumberEnd      int       //, optional
	ParentIndexNumber   int       //, optional
	SeriesName          string
	Album               string
	Artists             []string
	MediaStreams        []MediaStream
	ChapterImagesItemId string
	Chapters            []ChapterInfoDto
	HasPrimaryImage     bool
}

type BaseItemPerson

type BaseItemPerson struct {
	Name            string
	Id              string
	Role            string
	Type            string
	PrimaryImageTag string
	HasPrimaryImage bool
}

type ChapterInfoDto

type ChapterInfoDto struct {
	StartPositionTicks int64
	Name               string
	ImageTag           string
	HasImage           bool
}

type ExternalUrl

type ExternalUrl struct {
	Name string
	Url  string
}

type ItemQuery

type ItemQuery struct {
	UserId                         QueryField `encoding:"path" type:"string" optional:"false"`
	Person                         QueryField `encoding:"para" type:"string" optional:"true"`
	PersonTypes                    QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	Studios                        QueryField `encoding:"para" type:"[]string" optional:"true" sep:"|"`
	Artists                        QueryField `encoding:"para" type:"[]string" optional:"true" sep:"|"`
	Albums                         QueryField `encoding:"para" type:"[]string" optional:"true" sep:"|"`
	AllGenres                      QueryField `encoding:"para" type:"[]string" optional:"true" sep:"|"`
	Ids                            QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	VideoTypes                     QueryField `encoding:"para" type:"[]string" optional:"true" sep:"," options:"videofile,dvd,bluray,iso"`
	Is3D                           QueryField `encoding:"para" type:"bool" optional:"true"`
	SeriesStatus                   QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	NameStartsWithOrGreater        QueryField `encoding:"para" type:"string" optional:"true"`
	NameStartsWith                 QueryField `encoding:"para" type:"string" optional:"true"`
	NameLessThan                   QueryField `encoding:"para" type:"string" optional:"true"`
	AlbumArtistStartsWithOrGreater QueryField `encoding:"para" type:"string" optional:"true"`
	AirDays                        QueryField `encoding:"para" type:"[]time.Weekday" optional:"true" sep:","`
	MinOfficalRating               QueryField `encoding:"para" type:"string" optional:"true"`
	MaxOfficalRating               QueryField `encoding:"para" type:"string" optional:"true"`
	HasThemeSong                   QueryField `encoding:"para" type:"string" optional:"true"`
	HasThemeVideo                  QueryField `encoding:"para" type:"string" optional:"true"`
	HasSubtitles                   QueryField `encoding:"para" type:"string" optional:"true"`
	HasSpecialFeature              QueryField `encoding:"para" type:"string" optional:"true"`
	HasTrailer                     QueryField `encoding:"para" type:"string" optional:"true"`
	AdjacentTo                     QueryField `encoding:"para" type:"string" optional:"true"`
	MinIndexNumber                 QueryField `encoding:"para" type:"int" optional:"true"`
	MaxPlayers                     QueryField `encoding:"para" type:"int" optional:"true"`
	ParentIndexNumber              QueryField `encoding:"para" type:"int" optional:"true"`
	HasParentalRating              QueryField `encoding:"para" type:"bool" optional:"true"`
	IsHD                           QueryField `encoding:"para" type:"bool" optional:"true"`
	LocationTypes                  QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	ExcludeLocationTypes           QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	IsMissing                      QueryField `encoding:"para" type:"bool" optional:"true"`
	IsUnaired                      QueryField `encoding:"para" type:"bool" optional:"true"`
	IsVirtualUnaired               QueryField `encoding:"para" type:"bool" optional:"true"`
	MinCommunityRating             QueryField `encoding:"para" type:"int" optional:"true"`
	MinCriticRating                QueryField `encoding:"para" type:"int" optional:"true"`
	AiredDuringSeason              QueryField `encoding:"para" type:"int" optional:"true"`
	HasOverview                    QueryField `encoding:"para" type:"bool" optional:"true"`
	HasImdbId                      QueryField `encoding:"para" type:"bool" optional:"true"`
	HasTmdbId                      QueryField `encoding:"para" type:"bool" optional:"true"`
	HasTvdbId                      QueryField `encoding:"para" type:"bool" optional:"true"`
	IsYearMismatched               QueryField `encoding:"para" type:"bool" optional:"true"`
	IsInBoxSet                     QueryField `encoding:"para" type:"bool" optional:"true"`
	IsLocked                       QueryField `encoding:"para" type:"bool" optional:"true"`
	IsUnidentified                 QueryField `encoding:"para" type:"bool" optional:"true"`
	IsPlaceHolder                  QueryField `encoding:"para" type:"bool" optional:"true"`
	HasOfficialRating              QueryField `encoding:"para" type:"bool" optional:"true"`
	CollapseBoxSetItems            QueryField `encoding:"para" type:"bool" optional:"true"`
	StartIndex                     QueryField `encoding:"para" type:"int" optional:"true"`
	Limit                          QueryField `encoding:"para" type:"int" optional:"true"`
	Recursive                      QueryField `encoding:"para" type:"bool" optional:"true"`
	SortOrder                      QueryField `encoding:"para" type:"string" optional:"true" options:"Ascending,Descending"`
	ParentId                       QueryField `encoding:"para" type:"string" optional:"true"`
	Fields                         QueryField `` /* 271-byte string literal not displayed */
	ExcludeItemTypes               QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	IncludeItemTypes               QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	Filters                        QueryField `` /* 144-byte string literal not displayed */
	MediaTypes                     QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	ImageTypes                     QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	SortBy                         QueryField `` /* 219-byte string literal not displayed */
	IsPlayed                       QueryField `encoding:"para" type:"bool" optional:"true"`
	Genres                         QueryField `encoding:"para" type:"[]string" optional:"true" sep:"|"`
	OfficialRatings                QueryField `encoding:"para" type:"[]string" optional:"true" sep:"|"`
	Tags                           QueryField `encoding:"para" type:"[]string" optional:"true" sep:"|"`
	Years                          QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
	EnableImages                   QueryField `encoding:"para" type:"bool" optional:"true"`
	ImageTypeLimit                 QueryField `encoding:"para" type:"int" optional:"true"`
	EnableImageTypes               QueryField `encoding:"para" type:"[]string" optional:"true" sep:","`
}

func (*ItemQuery) Method

func (i *ItemQuery) Method() string

func (*ItemQuery) Path

func (i *ItemQuery) Path() string

type ItemsResult

type ItemsResult struct {
	Items            []BaseItemDto
	TotalRecordCount int
}

func (*ItemsResult) Type

func (i *ItemsResult) Type() string

type ListUsersQuery

type ListUsersQuery struct{}

func (*ListUsersQuery) Method

func (l *ListUsersQuery) Method() string

func (*ListUsersQuery) Path

func (l *ListUsersQuery) Path() string

type LoginQuery

type LoginQuery struct {
	Username QueryField `encoding:"para" type:"string" optional:"false"`
	Password QueryField `encoding:"para" type:"string" optional:"false"`
}

func (*LoginQuery) Method

func (l *LoginQuery) Method() string

func (*LoginQuery) Path

func (l *LoginQuery) Path() string

type MediaSourceInfo

type MediaSourceInfo struct {
	Protocol                   string //) = ['File' or 'Http' or 'Rtmp' or 'Rtsp'],
	Id                         string
	Path                       string
	Type                       string //) = ['Default' or 'Grouping' or 'Cache'],
	Container                  string
	Size                       int64 //,optional
	Name                       string
	RunTimeTicks               int64 //,optional
	ReadAtNativeFramerate      bool
	VideoType                  string        //,optional) = ['VideoFile' or 'Iso' or 'Dvd' or 'BluRay' or 'HdDvd'],
	IsoType                    string        //,optional) = ['Dvd' or 'BluRay'],
	Video3DFormat              string        //,optional) = ['HalfSideBySide' or 'FullSideBySide' or 'FullTopAndBottom' or 'HalfTopAndBottom'],
	MediaStreams               []MediaStream //Items/{ItemId}]
	PlayableStreamFileNames    []string
	Formats                    []string
	Bitrate                    int               //,optional
	Timestamp                  string            //,optional) = ['None' or 'Zero' or 'Valid'],
	RequiredHttpHeaders        map[string]string //`2[[String`/Items/{ItemId}
	DefaultAudioStreamIndex    int               //,optional
	DefaultSubtitleStreamIndex int               //,optional
	DefaultAudioStream         MediaStream       //Items/{ItemId}
	VideoStream                MediaStream       //Items/{ItemId})
}

type MediaStream

type MediaStream struct {
	Codec                string
	Language             string
	IsInterlaced         bool
	ChannelLayout        string
	BitRate              int //,optional
	BitDepth             int //,optional
	RefFrames            int //,optional
	PacketLength         int //,optional
	Channels             int //,optional
	SampleRate           int //,optional
	IsDefault            bool
	IsForced             bool
	Height               int     //,optional
	Width                int     //,optional
	AverageFrameRate     float32 //,optional
	RealFrameRate        float32 //,optional
	Profile              string
	Type                 string //) = ['Audio' or 'Video' or 'Subtitle' or 'EmbeddedImage'],
	AspectRatio          string
	Index                int
	IsExternal           bool
	IsTextSubtitleStream bool
	Path                 string
	PixelFormat          string
	Level                float64 //,optional
	IsAnamorphic         bool    //,optional
	IsCabac              bool    //,optional)
}

type MediaUrl

type MediaUrl struct {
	Url       string
	Name      string
	VideoSize string //,optional) = ['StandardDefinition' or 'HighDefinition']
}

type PlayerStateInfo

type PlayerStateInfo struct {
	PositionTicks       int64 //, optional),
	CanSeek             bool
	IsPaused            bool
	IsMuted             bool
	VolumeLevel         int //, optional),
	AudioStreamIndex    int //, optional),
	SubtitleStreamIndex int //, optional),
	MediaSourceId       string
	PlayMethod          string //, optional) = ['Transcode' or 'DirectStream' or 'DirectPlay']
}

type Query

type Query interface {
	Path() string   //The Relative Query Path on the server
	Method() string //http Mathod i.e. GET, POST, DELETE, ...
}

type QueryField

type QueryField interface{}

type Response

type Response interface{}

type SessionInfoDto

type SessionInfoDto struct {
	SupportedCommands     []string
	QueueableMediaTypes   []string
	PlayableMediaTypes    []string
	Id                    string
	UserId                string
	UserPrimaryImageTag   string
	UserName              string
	AdditionalUsers       []SessionUserInfo
	ApplicationVersion    string
	Client                string
	LastActivityDate      time.Time
	NowViewingItem        BaseItemInfo
	DeviceName            string
	NowPlayingItem        BaseItemInfo
	DeviceId              string
	SupportsRemoteControl bool
	PlayState             PlayerStateInfo
	TranscodingInfo       TranscodingInfo
}

type SessionUserInfo

type SessionUserInfo struct {
	UserId   string
	UserName string
}

type StreamFile

type StreamFile struct {
	Inode uint64
	Mode  os.FileMode
	Size  uint64
	// contains filtered or unexported fields
}

func (*StreamFile) Attr

func (s *StreamFile) Attr() fuse.Attr

func (*StreamFile) Name

func (s *StreamFile) Name() string

func (*StreamFile) Read

func (s *StreamFile) Read(req *fuse.ReadRequest, resp *fuse.ReadResponse, intr fs.Intr) fuse.Error

type StreamReader

type StreamReader struct {
	// contains filtered or unexported fields
}

StreamReader lets read from a "BaseItemDto" via the ReaderAt Interface. WARING: http Requests are SLOW, so if you may think about using a bigger buffer than you normally would.

func (*StreamReader) ReadAt

func (s *StreamReader) ReadAt(p []byte, offset int64) (int, error)

type StudioDto

type StudioDto struct {
	Name            string
	Id              string
	PrimaryImageTag string
	HasPrimaryImage bool
}

type TranscodingInfo

type TranscodingInfo struct {
	AudioCodec           string
	VideoCodec           string
	Container            string
	IsVideoDirect        bool
	IsAudioDirect        bool
	Bitrate              int     //, optional),
	Framerate            float32 //, optional),
	CompletionPercentage float64 //, optional),
	Width                int     //, optional),
	Height               int     //, optional),
	AudioChannels        int     //, optional)
}

type UserConfiguration

type UserConfiguration struct {
	MaxParentalRating               int //, optional
	IsAdministrator                 bool
	AudioLanguagePreference         string
	PlayDefaultAudioTrack           bool
	SubtitleLanguagePreference      string
	IsHidden                        bool
	IsDisabled                      bool
	DisplayMissingEpisodes          bool
	DisplayUnairedEpisodes          bool
	EnableRemoteControlOfOtherUsers bool
	EnableSharedDeviceControl       bool
	EnableLiveTvManagement          bool
	EnableLiveTvAccess              bool
	EnableMediaPlayback             bool
	EnableContentDeletion           bool
	GroupMoviesIntoBoxSets          bool
	BlockedMediaFolders             []string
	BlockedChannels                 []string
	DisplayChannelsWithinViews      []string
	ExcludeFoldersFromGrouping      []string
	SubtitleMode                    string //) = ['Default' or 'Always' or 'OnlyForced' or 'None'],
	DisplayCollectionsView          bool   //
	DisplayFoldersView              bool
	EnableLocalPassword             bool
	OrderedViews                    []string
	IncludeTrailersInSuggestions    bool
	EnableCinemaMode                bool
	AccessSchedules                 []AccessSchedule ///Users/{Id}
	EnableUserPreferenceAccess      bool
	LatestItemsExcludes             []string
	BlockedTags                     []string
	HasMigratedToPolicy             bool
}

type UserDto

type UserDto struct {
	Name                            string
	ServerId                        string
	ConnectUserName                 string
	ConnectUserId                   string
	ConnectLinkType                 string //, optional) = ['LinkedUser' or 'Guest'],
	Id                              string
	PrimaryImageTag                 string
	HasPassword                     bool
	HasConfiguredPassword           bool
	LastLoginDate                   time.Time //, optional
	LastActivityDate                time.Time //, optional
	Configuration                   UserConfiguration
	Policy                          UserPolicy
	PrimaryImageAspectRatio         float64 //, optional
	OriginalPrimaryImageAspectRatio float64 //, optional
	HasPrimaryImage                 bool
}

type UserItemDataDto

type UserItemDataDto struct {
	Rating                float64 //,optional
	PlayedPercentage      float64 //,optional
	UnplayedItemCount     int     //,optional
	PlaybackPositionTicks int64
	PlayCount             int
	IsFavorite            bool
	Likes                 bool      //,optional
	LastPlayedDate        time.Time //,optional
	Played                bool
	Key                   string
}

type UserPolicy

type UserPolicy struct {
	IsAdministrator                 bool
	IsHidden                        bool
	IsDisabled                      bool
	MaxParentalRating               int //, optional
	BlockedTags                     []string
	EnableUserPreferenceAccess      bool
	AccessSchedules                 []AccessSchedule ///Users/{Id}
	BlockedMediaFolders             []string
	BlockedChannels                 []string
	EnableRemoteControlOfOtherUsers bool
	EnableSharedDeviceControl       bool
	EnableLiveTvManagement          bool
	EnableLiveTvAccess              bool
	EnableMediaPlayback             bool
	EnableContentDeletion           bool
	EnableSync                      bool
	EnabledDevices                  []string
	EnableAllDevices                bool
}

type VideoStreamQuery

type VideoStreamQuery struct {
	Container string

	VideoCodec             QueryField `encoding:"para" type:"string" optional:"true" sep:"," options:"h264,mpeg4,theora,vpx,wmv"`
	VideoBitRate           QueryField `encoding:"para" type:"int" optional:"true"`
	AudioStreamIndex       QueryField `encoding:"para" type:"int" optional:"true"`
	VideoStreamIndex       QueryField `encoding:"para" type:"int" optional:"true"`
	SubtitleStreamIndex    QueryField `encoding:"para" type:"int" optional:"true"`
	Width                  QueryField `encoding:"para" type:"int" optional:"true"`
	Height                 QueryField `encoding:"para" type:"int" optional:"true"`
	MaxWidth               QueryField `encoding:"para" type:"int" optional:"true"`
	MaxHeight              QueryField `encoding:"para" type:"int" optional:"true"`
	MaxRefFrames           QueryField `encoding:"para" type:"int" optional:"true"`
	MaxVideoBitDepth       QueryField `encoding:"para" type:"int" optional:"true"`
	Framerate              QueryField `encoding:"para" type:"float64" optional:"true"`
	MaxFramerate           QueryField `encoding:"para" type:"float64" optional:"true"`
	Profile                QueryField `encoding:"para" type:"string" optional:"true"`
	Level                  QueryField `encoding:"para" type:"string" optional:"true"`
	SubtitleDeliveryMethod QueryField `encoding:"para" type:"string" optional:"true"`
	EnableAutoStreamCopy   QueryField `encoding:"para" type:"bool" optional:"true"`
	Cabac                  QueryField `encoding:"para" type:"bool" optional:"true"`
	Id                     QueryField `encoding:"path" type:"string" optional:"false"`
	MediaSourceId          QueryField `encoding:"para" type:"string" optional:"false"`
	DeviceId               QueryField `encoding:"para" type:"string" optional:"true"`
	AudioCodec             QueryField `encoding:"para" type:"string" optional:"true" sep:"," options:"aac,mp3,vorbis,wma"`
	StartTimeTicks         QueryField `encoding:"para" type:"int" optional:"true"`
	AudioBitRate           QueryField `encoding:"para" type:"int" optional:"true"`
	AudioChannels          QueryField `encoding:"para" type:"int" optional:"true"`
	AudioSampleRate        QueryField `encoding:"para" type:"int" optional:"true"`
	Static                 QueryField `encoding:"para" type:"bool" optional:"true"`
	DeviceProfileId        QueryField `encoding:"para" type:"string" optional:"true"`
}

func (*VideoStreamQuery) Method

func (v *VideoStreamQuery) Method() string

func (*VideoStreamQuery) Path

func (v *VideoStreamQuery) Path() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL