downloader

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const TempExt = ".tmp"

Variables

View Source
var ErrSkip = errors.New("skip")

Functions

This section is empty.

Types

type Downloader

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

func New

func New(opts Options) (*Downloader, error)

func (*Downloader) Download

func (d *Downloader) Download(ctx context.Context, limit int) error

type Item

type Item struct {
	ID int // unique in iter
	*tmedia.Media
}

type Iter

type Iter interface {
	Next(ctx context.Context) (*Item, error)
	Finish(ctx context.Context, id int) error
	Total(ctx context.Context) int
}

type Options added in v0.7.0

type Options struct {
	Pool       dcpool.Pool
	Dir        string
	RewriteExt bool
	SkipSame   bool
	PartSize   int
	Threads    int
	Iter       Iter
	Takeout    bool
}

Jump to

Keyboard shortcuts

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