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 {
|
if video.isLocal, video.localStreamIsFile, let localURL = video.localStream?.localURL {
|
||||||
guard localURL.startAccessingSecurityScopedResource() else {
|
guard localURL.startAccessingSecurityScopedResource() else {
|
||||||
model.navigation.presentAlert(title: "Could not open file")
|
model.navigation.presentAlert(title: "Could not open file")
|
||||||
|
model.closeCurrentItem()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
url = localURL
|
url = localURL
|
||||||
|
@ -293,6 +293,7 @@ final class MPVBackend: PlayerBackend {
|
|||||||
if video.isLocal, video.localStreamIsFile, let localStream = video.localStream {
|
if video.isLocal, video.localStreamIsFile, let localStream = video.localStream {
|
||||||
guard localStream.localURL.startAccessingSecurityScopedResource() else {
|
guard localStream.localURL.startAccessingSecurityScopedResource() else {
|
||||||
self.model.navigation.presentAlert(title: "Could not open file")
|
self.model.navigation.presentAlert(title: "Could not open file")
|
||||||
|
self.model.closeCurrentItem()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user