mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
fix a crash when format is hls
This commit is contained in:
parent
ef7a486fd4
commit
d8c8f8084b
@ -176,6 +176,11 @@ class Stream: Equatable, Hashable, Identifiable {
|
|||||||
|
|
||||||
var quality: String {
|
var quality: String {
|
||||||
guard localURL.isNil else { return "Opened File" }
|
guard localURL.isNil else { return "Opened File" }
|
||||||
|
|
||||||
|
if kind == .hls {
|
||||||
|
return "adaptive (HLS)"
|
||||||
|
}
|
||||||
|
|
||||||
return resolution.name
|
return resolution.name
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +188,7 @@ class Stream: Equatable, Hashable, Identifiable {
|
|||||||
guard localURL.isNil else { return "File" }
|
guard localURL.isNil else { return "File" }
|
||||||
|
|
||||||
if kind == .hls {
|
if kind == .hls {
|
||||||
return format.description
|
return "adaptive (HLS)"
|
||||||
}
|
}
|
||||||
|
|
||||||
if kind == .stream {
|
if kind == .stream {
|
||||||
@ -195,7 +200,7 @@ class Stream: Equatable, Hashable, Identifiable {
|
|||||||
var description: String {
|
var description: String {
|
||||||
guard localURL.isNil else { return resolutionAndFormat }
|
guard localURL.isNil else { return resolutionAndFormat }
|
||||||
let instanceString = instance.isNil ? "" : " - (\(instance!.description))"
|
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 {
|
var resolutionAndFormat: String {
|
||||||
|
Loading…
Reference in New Issue
Block a user