Add exception handling for externalURL
This commit is contained in:
parent
9508c5f113
commit
bae144c2bd
|
@ -11,6 +11,10 @@ import JellyfinAPI
|
|||
|
||||
extension MediaStream {
|
||||
func externalURL(base: String) -> URL? {
|
||||
var base = base
|
||||
while base.last == Character("/") {
|
||||
base.removeLast()
|
||||
}
|
||||
guard let deliveryURL = deliveryUrl else { return nil }
|
||||
return URL(string: base + deliveryURL)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue