goydl icon indicating copy to clipboard operation
goydl copied to clipboard

Data un-marshall fails if FPS is float

Open sam-ulrich1 opened this issue 5 years ago • 0 comments

json: cannot unmarshal number 23.976 into Go struct field .requested_formats.fps of type int

I get the following error in the case that FPS is calculated as a float. This is certainly a less common case but appears to be the result of the original file format from the download process.

I propose changing the FPS value in the specified struct to a float64 to ensure unmarshalling. If the user then wants to truncate to 32bit or some integer it is their discretion

sam-ulrich1 avatar Aug 20 '20 14:08 sam-ulrich1