mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
Fix parsing Piped streams
This commit is contained in:
parent
720bdde728
commit
419e8991c9
@ -488,8 +488,14 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
|
|||||||
let videoStreams = compatibleVideoStream(from: content)
|
let videoStreams = compatibleVideoStream(from: content)
|
||||||
|
|
||||||
videoStreams.forEach { videoStream in
|
videoStreams.forEach { videoStream in
|
||||||
let audioAsset = AVURLAsset(url: audioStream.dictionaryValue["url"]!.url!)
|
guard let audioAssetUrl = audioStream.dictionaryValue["url"]?.url,
|
||||||
let videoAsset = AVURLAsset(url: videoStream.dictionaryValue["url"]!.url!)
|
let videoAssetUrl = videoStream.dictionaryValue["url"]?.url
|
||||||
|
else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let audioAsset = AVURLAsset(url: audioAssetUrl)
|
||||||
|
let videoAsset = AVURLAsset(url: videoAssetUrl)
|
||||||
|
|
||||||
let videoOnly = videoStream.dictionaryValue["videoOnly"]?.boolValue ?? true
|
let videoOnly = videoStream.dictionaryValue["videoOnly"]?.boolValue ?? true
|
||||||
let resolution = Stream.Resolution.from(resolution: videoStream.dictionaryValue["quality"]!.stringValue)
|
let resolution = Stream.Resolution.from(resolution: videoStream.dictionaryValue["quality"]!.stringValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user