download

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DASH added in v0.8.0

func DASH(ctx context.Context, in, out string, info *nfo.MediaInfo, conf ...configurationFunction) error

DASH download mp4 file at media's url. Open DSH manifest to get best audio and video streams. Then download both streams and combine them using FFMPEG

func Download added in v0.8.0

func Download(ctx context.Context, log *mylog.MyLog, in, out string, info *nfo.MediaInfo, configfn ...configurationFunction) error

Download determine the type of media at given url and launch the appropriate download method

func FileNameCleaner added in v0.14.0

func FileNameCleaner(s string) string

FileNameCleaner return a safe file name from a given show name.

func Format2Digits added in v0.14.0

func Format2Digits(d string) string

Format2Digits return a number with 2 digits when there is only one digit

func MediaPath added in v0.14.0

func MediaPath(showPath string, m *matcher.MatchRequest, info *nfo.MediaInfo) (string, error)

MediaPath returns the full path for an episode using filename template when present

func PathNameCleaner added in v0.14.0

func PathNameCleaner(s string) string

PathNameCleaner return a safe path name from a given show name.

func SeasonPath added in v0.14.0

func SeasonPath(showPath string, m *matcher.MatchRequest, info *nfo.MediaInfo) (string, error)

SeasonPath returns the full path for the episode's season according the template

func WithLogger added in v0.13.0

func WithLogger(logger *mylog.MyLog) configurationFunction

WithLogger add a logger to the configuration

func WithProgress added in v0.8.0

func WithProgress(fb FeedBacker) configurationFunction

WithProgress add a feedbacker to the configuration

Types

type FeedBacker added in v0.16.0

type FeedBacker interface {
	Stage(stage string) // Indicate current stage
	Total(total int)    // Indicate the total number (could be bytes, percent )
	Update(current int) // Indicate the current position
	Done()              // Call when the task is done
}

FeedBacker is an iterface for providing feed back on concurrent tasks like a progression bar on the console

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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