videosources

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(providers map[models.VideoRefSource]SourceProvider) *Service

func (*Service) SourceProvider

func (s *Service) SourceProvider(videoRef models.VideoRef) (SourceProvider, error)

SourceProvider returns the SourceProvider that is registered to handle videos from the given source.

type SourceProvider

type SourceProvider interface {
	// GetVideoMetadata returns the metadata details for a sourceID.
	GetVideoMetadata(ctx context.Context, videoRef models.VideoRef) (*models.Video, error)

	GetVideoURL(videoRef models.VideoRef) string

	// DownloadVideo will download the video.
	DownloadVideo(ctx context.Context, videoRef models.VideoRef, options models.DownloadOptions, logline func(line models.LogMessage)) (outputFilename string, err error)
}

SourceProvider is a provider for a particular video source.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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