mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Close item if could not be opened
This commit is contained in:
parent
ebc9ea0031
commit
2c004b81fe
@ -133,6 +133,7 @@ final class AVPlayerBackend: PlayerBackend {
|
||||
if video.isLocal, video.localStreamIsFile, let localURL = video.localStream?.localURL {
|
||||
guard localURL.startAccessingSecurityScopedResource() else {
|
||||
model.navigation.presentAlert(title: "Could not open file")
|
||||
model.closeCurrentItem()
|
||||
return
|
||||
}
|
||||
url = localURL
|
||||
|
@ -293,6 +293,7 @@ final class MPVBackend: PlayerBackend {
|
||||
if video.isLocal, video.localStreamIsFile, let localStream = video.localStream {
|
||||
guard localStream.localURL.startAccessingSecurityScopedResource() else {
|
||||
self.model.navigation.presentAlert(title: "Could not open file")
|
||||
self.model.closeCurrentItem()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user