all repos — fixyoutube-go @ 4eded4e2bb67d13cb245ebec363e2d9f3195c11d

A better way to embed YouTube videos everywhere (inspired by FixTweet).

better handling of bad formats
Marco Andronaco andronacomarco@gmail.com
Tue, 02 Jan 2024 00:18:29 +0100
commit

4eded4e2bb67d13cb245ebec363e2d9f3195c11d

parent

4846d568efd55de76a5d085fe69abb4f30cff54d

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M invidious/invidious.goinvidious/invidious.go

@@ -200,15 +200,15 @@

temp := bytes.NewBuffer(nil) _, err = io.Copy(temp, resp.Body) if err == nil { // done - _, err2 := io.Copy(w, temp) - return err2 + _, err = io.Copy(w, temp) + return err } newIndex := formatIndex + 1 if newIndex < fmtAmount { return c.ProxyVideo(w, videoId, newIndex) } - + _, err = io.Copy(w, temp) return err }