Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadOption ¶
type DownloadOption struct { ContentCredit string // content credit Format string // download format Force bool // force download, delete the existing file }
func (*DownloadOption) Validate ¶
func (opt *DownloadOption) Validate() error
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader is responsible for downloading contents using youtube-dl. @see https://github.com/yt-dlp/yt-dlp
func NewDownloader ¶
func NewDownloader(conf *conf.DownloaderConfig) (*Downloader, error)
NewDownloader creates a new Downloader instance and ensures the necessary binaries and directories are set up.
func (*Downloader) Download ¶
func (d *Downloader) Download(ctx context.Context, opt *DownloadOption) (*Result, error)
Download downloads a content based on the provided DownloadOption and returns the Result.
Click to show internal directories.
Click to hide internal directories.