Documentation ¶
Index ¶
- Constants
- Variables
- type M3u8Downloader
- func (d *M3u8Downloader) Crawl()
- func (d *M3u8Downloader) Run() (err error)
- func (d *M3u8Downloader) SetFixShardFunc(fixShardFunc func(shard string, m3u8Url string) string)
- func (d *M3u8Downloader) SetIsShardFunc(isShardFunc func(line string) (need bool))
- func (d *M3u8Downloader) SetRequestFunc(requestFunc func(url string) (*http.Client, *http.Request, error))
- type ProcessBar
- type WaitGroup
Constants ¶
View Source
const ( KB = 1024 MB = 1024 * 1024 GB = 1024 * 1024 * 1024 )
Variables ¶
View Source
var Logger *logrus.Logger
Functions ¶
This section is empty.
Types ¶
type M3u8Downloader ¶
type M3u8Downloader struct {
// contains filtered or unexported fields
}
func Default ¶
func Default(url, saveName string) *M3u8Downloader
func (*M3u8Downloader) Crawl ¶
func (d *M3u8Downloader) Crawl()
func (*M3u8Downloader) Run ¶
func (d *M3u8Downloader) Run() (err error)
prepare -> parse -> fix -> download -> merge -> clear
func (*M3u8Downloader) SetFixShardFunc ¶
func (d *M3u8Downloader) SetFixShardFunc(fixShardFunc func(shard string, m3u8Url string) string)
func (*M3u8Downloader) SetIsShardFunc ¶
func (d *M3u8Downloader) SetIsShardFunc(isShardFunc func(line string) (need bool))
func (*M3u8Downloader) SetRequestFunc ¶
type ProcessBar ¶
type ProcessBar struct {
// contains filtered or unexported fields
}
func NewBar ¶
func NewBar(current, total int) *ProcessBar
func NewBarWithGraph ¶
func NewBarWithGraph(start, total int, graph string) *ProcessBar
func (*ProcessBar) Add ¶
func (b *ProcessBar) Add(bytes uint64)
func (*ProcessBar) Reset ¶
func (b *ProcessBar) Reset(current int)
func (*ProcessBar) Start ¶
func (b *ProcessBar) Start()
type WaitGroup ¶
type WaitGroup struct {
// contains filtered or unexported fields
}
func NewWaitGroup ¶
Click to show internal directories.
Click to hide internal directories.