YouTubeDownloader

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 16 Imported by: 0

README

YouTubeDownloader

YouTubeDownloader is a simple cross-platform YouTube downloader.

Requirements

Chrome/Chromium browser
FFmpeg

Tutorial for Windows: https://www.wikihow.com/Install-FFmpeg-on-Windows

Usage

Known Issues

  • Some formats are slow to download, please report on #1

TODO

  • Add FFmpeg (merging process) progress

Changelog

Refer to CHANGELOG.md


Report a bug / Request a feature

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string = "dev"
)

Functions

func BindUI

func BindUI(ui lorca.UI)

func Clean

func Clean()

func DeleteFile

func DeleteFile(file string) error

func DownloadVideo

func DownloadVideo(ctx context.Context, tmpdir string, extractor E.Extractor, downloader *D.Downloader, video interface{}, format interface{}, progress func(*D.Progress, *D.Progress)) (string, error)

func FileExists

func FileExists(path string) bool

func GetDir

func GetDir(path string) string

func Init

func Init()

func LoadUI

func LoadUI(ui lorca.UI, server net.Listener)

func MarshalJSON

func MarshalJSON(v interface{}) []byte

func MarshalJSONS

func MarshalJSONS(v interface{}) string

func MoveFile added in v0.1.1

func MoveFile(sourcePath, destPath string) error

https://gist.github.com/var23rav/23ae5d0d4d830aff886c3c970b8f6c6b

func NewServer

func NewServer() net.Listener

func NewUI

func NewUI() lorca.UI

func OpenFolder

func OpenFolder(file string) error

func RunFile

func RunFile(file string) error

Types

type Task

type Task struct {
	Context         context.Context
	CancelFunc      context.CancelFunc
	Uuid            string
	Tmpdir          string
	PreCancelFuncs  []func()
	PostCancelFuncs []func()
}

func NewTask

func NewTask(uuid string) *Task

func (*Task) Abort

func (Task *Task) Abort()

func (*Task) Done

func (Task *Task) Done()

type Tasks

type Tasks map[string]*Task

func NewTasks

func NewTasks() Tasks

func (Tasks) Abort

func (Tasks Tasks) Abort(uuid string) error

func (Tasks) Done

func (Tasks Tasks) Done(uuid string) error

func (Tasks) New

func (Tasks Tasks) New(uuid string) *Task

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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