ytdl

package
v0.0.0-...-8dea4bf Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDownloadTimeout = 10 * time.Minute
	UpdatePeriod           = 24 * time.Hour
)

Variables

Functions

This section is empty.

Types

type Config

type Config struct {
	// SelfUpdate toggles self update every 24 hour
	SelfUpdate bool `toml:"self_update"`
	// Timeout in minutes for youtube-dl process to finish download
	Timeout int `toml:"timeout"`
	// CustomBinary is a custom path to youtube-dl, this allows using various youtube-dl forks.
	CustomBinary string `toml:"custom_binary"`
}

Config is a youtube-dl related configuration

type YoutubeDl

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

func New

func New(ctx context.Context, cfg Config) (*YoutubeDl, error)

func (*YoutubeDl) Download

func (dl *YoutubeDl) Download(ctx context.Context, feedConfig *feed.Config, episode *model.Episode) (r io.ReadCloser, err error)

func (*YoutubeDl) Update

func (dl *YoutubeDl) Update(ctx context.Context) error

Jump to

Keyboard shortcuts

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