fanart

package
v0.0.0-...-29a3764 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIURL ...
	APIURL = "http://webservice.fanart.tv"
	// ClientID ...
	ClientID = "decb307ca800170b833c3061863974f3"
	// APIVersion ...
	APIVersion = "v3"
)

Variables

This section is empty.

Functions

func Get

func Get(endPoint string, params url.Values) (resp *napping.Response, err error)

Get ...

func GetBestImage

func GetBestImage(old string, lists ...[]*Image) string

GetBestImage returns best image from multiple lists, according to the lang setting. Taking order of lists into account.

func GetBestShowImage

func GetBestShowImage(season, old string, lists ...[]*ShowImage) string

GetBestShowImage returns best image from multiple lists, according to the lang setting. Taking order of lists into account.

Types

type Disk

type Disk struct {
	ID       string `json:"id"`
	URL      string `json:"url"`
	Lang     string `json:"lang"`
	Likes    string `json:"likes"`
	Disc     string `json:"disc"`
	DiscType string `json:"disc_type"`
}

Disk ...

func (*Disk) MarshalMsg

func (z *Disk) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Disk) Msgsize

func (z *Disk) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Disk) UnmarshalMsg

func (z *Disk) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Image

type Image struct {
	ID    string `json:"id"`
	URL   string `json:"url"`
	Lang  string `json:"lang"`
	Likes string `json:"likes"`
}

Image ...

func (*Image) MarshalMsg

func (z *Image) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Image) Msgsize

func (z *Image) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Image) UnmarshalMsg

func (z *Image) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Movie

type Movie struct {
	Name            string   `json:"name"`
	TmdbID          string   `json:"tmdb_id"`
	ImdbID          string   `json:"imdb_id"`
	HDMovieClearArt []*Image `json:"hdmovieclearart"`
	MoviePoster     []*Image `json:"movieposter"`
	MovieBackground []*Image `json:"moviebackground"`
	MovieDisc       []*Disk  `json:"moviedisc"`
	MovieThumb      []*Image `json:"moviethumb"`
	MovieArt        []*Image `json:"movieart"`
	MovieBanner     []*Image `json:"moviebanner"`
}

Movie ...

func GetMovie

func GetMovie(tmdbID int) (movie *Movie)

GetMovie ...

func (*Movie) MarshalMsg

func (z *Movie) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Movie) Msgsize

func (z *Movie) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Movie) ToListItemArt

func (fa *Movie) ToListItemArt(old *xbmc.ListItemArt) *xbmc.ListItemArt

ToListItemArt ...

func (*Movie) UnmarshalMsg

func (z *Movie) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Show

type Show struct {
	Name           string       `json:"name"`
	TvdbID         string       `json:"thetvdb_id"`
	HDClearArt     []*ShowImage `json:"hdclearart"`
	ClearArt       []*ShowImage `json:"clearart"`
	TVPoster       []*ShowImage `json:"tvposter"`
	TVBanner       []*ShowImage `json:"tvbanner"`
	TVThumb        []*ShowImage `json:"tvthumb"`
	ShowBackground []*ShowImage `json:"showbackground"`
	SeasonPoster   []*ShowImage `json:"seasonposter"`
	SeasonThumb    []*ShowImage `json:"seasonthumb"`
	SeasonBanner   []*ShowImage `json:"seasonbanner"`
	CharacterArt   []*ShowImage `json:"characterart"`
}

Show ...

func GetShow

func GetShow(tvdbID int) (show *Show)

GetShow ...

func (*Show) MarshalMsg

func (z *Show) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Show) Msgsize

func (z *Show) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Show) ToEpisodeListItemArt

func (fa *Show) ToEpisodeListItemArt(season int, old *xbmc.ListItemArt) *xbmc.ListItemArt

ToEpisodeListItemArt ...

func (*Show) ToListItemArt

func (fa *Show) ToListItemArt(old *xbmc.ListItemArt) *xbmc.ListItemArt

ToListItemArt ...

func (*Show) ToSeasonListItemArt

func (fa *Show) ToSeasonListItemArt(season int, old *xbmc.ListItemArt) *xbmc.ListItemArt

ToSeasonListItemArt ...

func (*Show) UnmarshalMsg

func (z *Show) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ShowImage

type ShowImage struct {
	Image
	Season string `json:"season"`
}

ShowImage ...

func (*ShowImage) MarshalMsg

func (z *ShowImage) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*ShowImage) Msgsize

func (z *ShowImage) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ShowImage) UnmarshalMsg

func (z *ShowImage) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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