From 1ee750c1da0355ca32a96df40fc731c99b870279 Mon Sep 17 00:00:00 2001 From: JB Pinalie <2850825+jybp@users.noreply.github.com> Date: Sat, 2 Mar 2024 16:41:40 +0100 Subject: [PATCH] Fix framerate parsing --- twitch/twitch.go | 6 +++--- twitchdl_clip.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/twitch/twitch.go b/twitch/twitch.go index 5de4b16..8ac91ab 100644 --- a/twitch/twitch.go +++ b/twitch/twitch.go @@ -141,9 +141,9 @@ type ClipVideo struct { Value string `json:"value"` } `json:"playbackAccessToken"` Qualities []struct { - FrameRate int `json:"frameRate"` - Quality string `json:"quality"` - SourceURL string `json:"sourceURL"` + FrameRate float64 `json:"frameRate"` + Quality string `json:"quality"` + SourceURL string `json:"sourceURL"` } `json:"videoQualities"` } diff --git a/twitchdl_clip.go b/twitchdl_clip.go index 7ec6ce7..aff4515 100644 --- a/twitchdl_clip.go +++ b/twitchdl_clip.go @@ -11,7 +11,7 @@ import ( "github.com/pkg/errors" ) -const clipQualityFramerateFormat = "%sp%d" +const clipQualityFramerateFormat = "%sp%.f" func downloadClip(ctx context.Context, client *http.Client, clientID, id, quality string) (io.ReadCloser, error) { api := twitch.New(client, clientID)