francetv

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName = "francetv"
)

Provider constants

Variables

This section is empty.

Functions

func WithGetter

func WithGetter(g getter) func(ftv *FranceTV)

WithGetter inject a getter in FranceTV object instead of normal one

Types

type AlgoliaConfig added in v0.5.0

type AlgoliaConfig struct {
	AlgoliaAPIContentMaxPage            int    `json:"algolia_api_content_max_page"`
	AlgoliaAPIContentPaginitationLimit  int    `json:"algolia_api_content_paginitation_limit"`
	AlgoliaAPIIndexContent              string `json:"algolia_api_index_content"`
	AlgoliaAPIIndexTaxonomy             string `json:"algolia_api_index_taxonomy"`
	AlgoliaAPIKey                       string `json:"algolia_api_key"`
	AlgoliaAPITaxonomyPaginitationLimit int    `json:"algolia_api_taxonomy_paginitation_limit"`
	AlgoliaAppID                        string `json:"algolia_app_id"`
	BookmarkGetURL                      string `json:"bookmark_get_url"`
	BookmarkPostURL                     string `json:"bookmark_post_url"`
	Environment                         string `json:"environment"`
	GinLibURL                           string `json:"gin_lib_url"`
	GinPersonalDataLink                 string `json:"gin_personal_data_link"`
	RecoSystemAuthorization             string `json:"reco_system_authorization"`
	RecoSystemHost                      string `json:"reco_system_host"`
	TagManagementSystemsURL             string `json:"tag_management_systems_url"`
	WatchingGetURL                      string `json:"watching_get_url"`
	WatchingHitTimer                    int    `json:"watching_hit_timer"`
	WatchingMinTime                     int    `json:"watching_min_time"`
	WatchingPostURL                     string `json:"watching_post_url"`
}

AlgoliaConfig to be extracted from home page

type AlgoliaParam added in v0.5.0

type AlgoliaParam map[string]string

type FranceTV

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

FranceTV structure handles france-tv catalog of shows

func New

func New(conf ...func(ftv *FranceTV)) (*FranceTV, error)

New setup a Show provider for France Télévisions

func (*FranceTV) DebugMode added in v0.4.0

func (p *FranceTV) DebugMode(mode bool)

DebugMode switch debug mode

func (FranceTV) GetShowFileName

func (FranceTV) GetShowFileName(ctx context.Context, s *providers.Show) string

GetShowFileName return a file name with a path that is compatible with PLEX server:

ShowName/Season NN/ShowName - sNNeMM - Episode title
Show and Episode names are sanitized to avoid problem when saving on the file system

func (*FranceTV) GetShowFileNameMatcher

func (p *FranceTV) GetShowFileNameMatcher(ctx context.Context, s *providers.Show) string

GetShowFileNameMatcher return a file pattern of this show used for detecting already got episode even when episode or season is different

func (*FranceTV) GetShowInfo

func (p *FranceTV) GetShowInfo(ctx context.Context, s *providers.Show) error

GetShowInfo query the URL from InfoOeuvre web service

func (*FranceTV) GetShowStreamURL

func (p *FranceTV) GetShowStreamURL(ctx context.Context, s *providers.Show) (string, error)

GetShowStreamURL return the show's URL, a m3u8 playlist

func (FranceTV) Name

func (FranceTV) Name() string

Name return the name of the provider

func (*FranceTV) Shows

func (p *FranceTV) Shows(ctx context.Context, mm []*providers.MatchRequest) chan *providers.Show

Shows return shows that match with matching list.

type Player added in v0.5.0

type Player struct {
	Video struct {
		URL   string `json:"url"`
		Token string `json:"token"`
	} `json:video`
}

type Requests added in v0.5.0

type Requests struct {
	IndexName string       `json:"indexName"`
	Params    AlgoliaParam `json:"params"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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