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.
Click to show internal directories.
Click to hide internal directories.