ytdlp

package
v0.53.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Progress

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

func (*Progress) OnDone

func (p *Progress) OnDone(ctx context.Context, task *Task, err error)

OnDone implements ProgressTracker.

func (*Progress) OnProgress

func (p *Progress) OnProgress(ctx context.Context, task *Task, status string)

OnProgress implements ProgressTracker.

func (*Progress) OnStart

func (p *Progress) OnStart(ctx context.Context, task *Task)

OnStart implements ProgressTracker.

type ProgressTracker

type ProgressTracker interface {
	OnStart(ctx context.Context, task *Task)
	OnProgress(ctx context.Context, task *Task, status string)
	OnDone(ctx context.Context, task *Task, err error)
}

ProgressTracker defines the interface for tracking ytdlp task progress

func NewProgress

func NewProgress(msgID int, userID int64) ProgressTracker

type Task

type Task struct {
	ID string

	URLs     []string
	Flags    []string
	Storage  storage.Storage
	StorPath string
	Progress ProgressTracker
	// contains filtered or unexported fields
}

func NewTask

func NewTask(
	id string,
	ctx context.Context,
	urls []string,
	flags []string,
	stor storage.Storage,
	storPath string,
	progressTracker ProgressTracker,
) *Task

func (*Task) Execute

func (t *Task) Execute(ctx context.Context) error

Execute implements core.Executable.

func (*Task) TaskID

func (t *Task) TaskID() string

TaskID implements core.Executable.

func (*Task) Title

func (t *Task) Title() string

Title implements core.Executable.

func (*Task) Type

func (t *Task) Type() tasktype.TaskType

Type implements core.Executable.

Jump to

Keyboard shortcuts

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