From d8c8f8084b4d2201fdd274a2abbd4b924e69f719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20F=C3=B6rster?= Date: Thu, 9 May 2024 21:15:14 +0200 Subject: [PATCH] fix a crash when format is hls --- Model/Stream.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Model/Stream.swift b/Model/Stream.swift index 04536f16..65e58993 100644 --- a/Model/Stream.swift +++ b/Model/Stream.swift @@ -176,6 +176,11 @@ class Stream: Equatable, Hashable, Identifiable { var quality: String { guard localURL.isNil else { return "Opened File" } + + if kind == .hls { + return "adaptive (HLS)" + } + return resolution.name } @@ -183,7 +188,7 @@ class Stream: Equatable, Hashable, Identifiable { guard localURL.isNil else { return "File" } if kind == .hls { - return format.description + return "adaptive (HLS)" } if kind == .stream { @@ -195,7 +200,7 @@ class Stream: Equatable, Hashable, Identifiable { var description: String { guard localURL.isNil else { return resolutionAndFormat } let instanceString = instance.isNil ? "" : " - (\(instance!.description))" - return format != .hls ? "\(resolutionAndFormat)\(instanceString)" : "\(format.description)\(instanceString)" + return format != .hls ? "\(resolutionAndFormat)\(instanceString)" : "adaptive (HLS)\(instanceString)" } var resolutionAndFormat: String {