mirror of
https://github.com/yattee/yattee.git
synced 2025-01-25 22:27:04 +00:00
Fix extracting FPS
This commit is contained in:
parent
ff54f37d67
commit
0268798bcc
@ -512,7 +512,7 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
|
|||||||
let videoOnly = videoStream.dictionaryValue["videoOnly"]?.boolValue ?? true
|
let videoOnly = videoStream.dictionaryValue["videoOnly"]?.boolValue ?? true
|
||||||
let quality = videoStream.dictionaryValue["quality"]?.string ?? "unknown"
|
let quality = videoStream.dictionaryValue["quality"]?.string ?? "unknown"
|
||||||
let qualityComponents = quality.components(separatedBy: "p")
|
let qualityComponents = quality.components(separatedBy: "p")
|
||||||
let fps = Int(qualityComponents[1].isEmpty ? "30" : qualityComponents[1])
|
let fps = qualityComponents.count > 1 ? Int(qualityComponents[1]) : 30
|
||||||
let resolution = Stream.Resolution.from(resolution: quality, fps: fps)
|
let resolution = Stream.Resolution.from(resolution: quality, fps: fps)
|
||||||
let videoFormat = videoStream.dictionaryValue["format"]?.stringValue
|
let videoFormat = videoStream.dictionaryValue["format"]?.stringValue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user