From 58ba6f5fe71176d2a031c234de58b5ef83c64995 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 24 Jul 2023 19:09:56 +0200 Subject: [PATCH] Fix #519 --- Model/Applications/PipedAPI.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Model/Applications/PipedAPI.swift b/Model/Applications/PipedAPI.swift index 524ee3ad..6b27ff5f 100644 --- a/Model/Applications/PipedAPI.swift +++ b/Model/Applications/PipedAPI.swift @@ -620,6 +620,10 @@ final class PipedAPI: Service, ObservableObject, VideosAPI { .dictionaryValue["audioStreams"]? .arrayValue .filter { $0.dictionaryValue["format"]?.string == "M4A" } + .filter { stream in + let type = stream.dictionaryValue["audioTrackType"]?.string + return type == nil || type == "ORIGINAL" + } .sorted { $0.dictionaryValue["bitrate"]?.int ?? 0 > $1.dictionaryValue["bitrate"]?.int ?? 0