Remove best resolution setting

This commit is contained in:
Arkadiusz Fal
2022-08-15 00:16:02 +02:00
parent 409b229dc8
commit d2cecf164d
3 changed files with 6 additions and 14 deletions

View File

@@ -4,7 +4,7 @@ import Foundation
struct QualityProfile: Hashable, Identifiable, Defaults.Serializable {
static var bridge = QualityProfileBridge()
static var defaultProfile = Self(id: "default", backend: .mpv, resolution: .hd720p60, formats: [.stream])
static var highQualityProfile = Self(id: "highQuality", backend: .mpv, resolution: .best, formats: [.webm, .mp4, .av1, .avc1])
static var highQualityProfile = Self(id: "highQuality", backend: .mpv, resolution: .hd2160p60, formats: [.webm, .mp4, .av1, .avc1])
enum Format: String, CaseIterable, Identifiable, Defaults.Serializable {
case hls
@@ -65,7 +65,7 @@ struct QualityProfile: Hashable, Identifiable, Defaults.Serializable {
return true
}
let resolutionMatch = !stream.resolution.isNil && (resolution == .best || (resolution.value >= stream.resolution))
let resolutionMatch = !stream.resolution.isNil && resolution.value >= stream.resolution
if resolutionMatch, formats.contains(.stream), stream.kind == .stream {
return true