Documentation ¶
Index ¶
- func DASH(ctx context.Context, in, out string, info *nfo.MediaInfo, ...) error
- func Download(ctx context.Context, log *mylog.MyLog, in, out string, info *nfo.MediaInfo, ...) error
- func FileNameCleaner(s string) string
- func Format2Digits(d string) string
- func MediaPath(showPath string, m *matcher.MatchRequest, info *nfo.MediaInfo) (string, error)
- func PathNameCleaner(s string) string
- func SeasonPath(showPath string, m *matcher.MatchRequest, info *nfo.MediaInfo) (string, error)
- func WithLogger(logger *mylog.MyLog) configurationFunction
- func WithProgress(fb FeedBacker) configurationFunction
- type FeedBacker
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
FileNameCleaner return a safe file name from a given show name.
func Format2Digits ¶ added in v0.14.0
Format2Digits return a number with 2 digits when there is only one digit
func MediaPath ¶ added in v0.14.0
MediaPath returns the full path for an episode using filename template when present
func PathNameCleaner ¶ added in v0.14.0
PathNameCleaner return a safe path name from a given show name.
func SeasonPath ¶ added in v0.14.0
SeasonPath returns the full path for the episode's season according the template
func WithLogger ¶ added in v0.13.0
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