diff --git a/download/download.go b/download/download.go index 1301445..619896c 100644 --- a/download/download.go +++ b/download/download.go @@ -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" + } + } diff --git a/download/download_test.go b/download/download_test.go index 5230385..d1c89f1 100644 --- a/download/download_test.go +++ b/download/download_test.go @@ -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 -