Add state for "Fixing MPEG-TS" which takes a while

This commit is contained in:
Justin Hawkins 2022-04-09 17:50:26 +09:30
parent 15ee200615
commit 5c362df35d
2 changed files with 11 additions and 0 deletions

View File

@ -335,4 +335,11 @@ func (dl *Download) updateMetadata(s string) {
dl.State = "Downloading metadata, page " + matches[1]
}
// [FixupM3u8] Fixing MPEG-TS in MP4 container of "file [-168849776_456239489].mp4"
metadataFixup := regexp.MustCompile(`Fixing MPEG-TS in MP4 container`)
matches = metadataFixup.FindStringSubmatch(s)
if len(matches) == 1 {
dl.State = "Fixing MPEG-TS in MP4"
}
}

View File

@ -47,6 +47,10 @@ func TestUpdateMetadata(t *testing.T) {
}
// [FixupM3u8] Fixing MPEG-TS in MP4 container of "file [-168849776_456239489].mp4"
newD.updateMetadata("[FixupM3u8] Fixing MPEG-TS in MP4 container of \"file [-168849776_456239489].mp4")
if newD.State != "Fixing MPEG-TS in MP4" {
t.Fatalf("did not see fixup state - state is %s", newD.State)
}
// deletes
// TODO. Not sure why I don't always see the "Deleting original file" messages after merge -