Alternative download ETA string
This commit is contained in:
parent
9d3f54d2ee
commit
15ee200615
@ -266,7 +266,8 @@ func (dl *Download) updateMetadata(s string) {
|
|||||||
defer dl.mutex.Unlock()
|
defer dl.mutex.Unlock()
|
||||||
|
|
||||||
// [download] 49.7% of ~15.72MiB at 5.83MiB/s ETA 00:07
|
// [download] 49.7% of ~15.72MiB at 5.83MiB/s ETA 00:07
|
||||||
etaRE := regexp.MustCompile(`download.+ETA +(\d\d:\d\d(?::\d\d)?)$`)
|
// [download] 99.3% of ~1.42GiB at 320.87KiB/s ETA 00:07 (frag 212/214)
|
||||||
|
etaRE := regexp.MustCompile(`download.+ETA +(\d\d:\d\d(?::\d\d)?)`)
|
||||||
matches := etaRE.FindStringSubmatch(s)
|
matches := etaRE.FindStringSubmatch(s)
|
||||||
if len(matches) == 2 {
|
if len(matches) == 2 {
|
||||||
dl.Eta = matches[1]
|
dl.Eta = matches[1]
|
||||||
|
@ -40,6 +40,14 @@ func TestUpdateMetadata(t *testing.T) {
|
|||||||
t.Fatalf("%v", newD.Files)
|
t.Fatalf("%v", newD.Files)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// different download
|
||||||
|
newD.updateMetadata("[download] 99.3% of ~1.42GiB at 320.87KiB/s ETA 00:07 (frag 212/214)")
|
||||||
|
if newD.Eta != "00:07" {
|
||||||
|
t.Fatalf("bad short eta in dl with frag\n%v", newD)
|
||||||
|
}
|
||||||
|
|
||||||
|
// [FixupM3u8] Fixing MPEG-TS in MP4 container of "file [-168849776_456239489].mp4"
|
||||||
|
|
||||||
// deletes
|
// deletes
|
||||||
// TODO. Not sure why I don't always see the "Deleting original file" messages after merge -
|
// TODO. Not sure why I don't always see the "Deleting original file" messages after merge -
|
||||||
// maybe a youtube-dl fork thing?
|
// maybe a youtube-dl fork thing?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user