epgdata

package
v0.0.0-...-312cc25 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(showDays []*ShowDay) (err error)

func Save

func Save(data interface{}) (err error)

func WriteChannelsFile

func WriteChannelsFile(channels []*Channel) error

Types

type Actor

type Actor struct {
	Actor string
	Role  string
}

func (*Actor) UnmarshalJSON

func (a *Actor) UnmarshalJSON(data []byte) error

type Channel

type Channel struct {
	ID         string       `json:"id"`
	Name       string       `json:"name"`
	NameShort  string       `json:"name_short"`
	IsPremium  bool         `json:"is_premium"`
	ImageSmall ChannelImage `json:"image_small"`
	ImageLarge ChannelImage `json:"image_large"`
}

func ReadChannelsFile

func ReadChannelsFile() ([]*Channel, error)

type ChannelImage

type ChannelImage struct {
	Hash string `json:"hash"`
	URL  string `json:"url"`
}

type Image

type Image struct {
	Source string
	Width  string
	Height string
}

type Images

type Images struct {
	Size130 *Image
	Size320 *Image
	Size476 *Image
	Size952 *Image
}

func (*Images) UnmarshalJSON

func (i *Images) UnmarshalJSON(data []byte) error

type Show

type Show struct {
	ID                string          `json:"id"`
	HexID             string          `json:"hexId"`
	AssetID           string          `json:"assetId"`
	SharingID         string          `json:"sharingId"`
	TrackingID        string          `json:"trackingId"`
	BroadcasterID     string          `json:"broadcasterId"`
	BroadcasterName   string          `json:"broadcasterName"`
	Country           string          `json:"country,omitempty"`
	CurrentTopics     string          `json:"currentTopics,omitempty"`
	EpisodeTitle      string          `json:"episodeTitle,omitempty"`
	Genre             string          `json:"genre"`
	Images            Images          `json:"images"`
	IsHDTV            bool            `json:"isHDTV"`
	IsLive            bool            `json:"isLive"`
	IsNew             bool            `json:"isNew"`
	IsPayTv           bool            `json:"isPayTv"`
	IsStereo          bool            `json:"isStereo"`
	IsTipOfTheDay     bool            `json:"isTipOfTheDay"`
	IsTopTip          bool            `json:"isTopTip"`
	LengthNetAndGross string          `json:"lengthNetAndGross"`
	RepeatHint        string          `json:"repeatHint,omitempty"`
	Subline           string          `json:"subline,omitempty"`
	Text              string          `json:"text,omitempty"`
	IsOriginalText    bool            `json:"isOriginalText"`
	Timeend           dateTime        `json:"timeend"`
	Timestart         dateTime        `json:"timestart"`
	Title             string          `json:"title"`
	OriginalTitle     string          `json:"originalTitle,omitempty"`
	SartID            string          `json:"sart_id"`
	Year              int             `json:"year"`
	Actors            []*Actor        `json:"actors,omitempty"`
	Anchorman         *StdListElement `json:"anchorman,omitempty"`
	Director          *StdListElement `json:"director,omitempty"`
	StudioGuests      *StdListElement `json:"studio_guests,omitempty"`
	EpisodeNumber     seriesNumber    `json:"episodeNumber,omitempty"`
	SeasonNumber      seriesNumber    `json:"seasonNumber,omitempty"`
	Videos            []struct {
		Title      string `json:"title"`
		Catchline  string `json:"catchline"`
		BlockAds   int    `json:"blockAds"`
		StillImage string `json:"stillImage"`
		Video      []struct {
			Type     string `json:"type"`
			URL      string `json:"url"`
			Duration int    `json:"duration"`
			Width    int    `json:"width"`
			Height   int    `json:"height"`
		} `json:"video"`
	} `json:"videos,omitempty"`
	ThumbID        string `json:"thumbId,omitempty"`
	ThumbIDNumeric int    `json:"thumbIdNumeric,omitempty"`
	Fsk            int    `json:"fsk,omitempty"`
	Preview        string `json:"preview,omitempty"`
}

func NewEPGData

func NewEPGData() []*Show

func ReadEPGDay

func ReadEPGDay(date string) ([]*Show, error)

func ReadEPGFile

func ReadEPGFile(path string) ([]*Show, error)

func (*Show) HasCredits

func (s *Show) HasCredits() bool

type ShowDay

type ShowDay struct {
	Date  string
	Shows []*Show
}

type StdListElement

type StdListElement struct {
	List []string
}

func (*StdListElement) UnmarshalJSON

func (r *StdListElement) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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