mirror of
https://github.com/yattee/yattee.git
synced 2024-12-23 22:13:41 +00:00
Clear system controls after closing item
This commit is contained in:
parent
d21d149624
commit
4ec9791467
@ -559,6 +559,7 @@ final class PlayerModel: ObservableObject {
|
|||||||
|
|
||||||
prepareCurrentItemForHistory(finished: finished)
|
prepareCurrentItemForHistory(finished: finished)
|
||||||
currentItem = nil
|
currentItem = nil
|
||||||
|
updateNowPlayingInfo()
|
||||||
|
|
||||||
backend.closeItem()
|
backend.closeItem()
|
||||||
aspectRatio = VideoPlayerView.defaultAspectRatio
|
aspectRatio = VideoPlayerView.defaultAspectRatio
|
||||||
@ -749,7 +750,7 @@ final class PlayerModel: ObservableObject {
|
|||||||
|
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
var windowTitle: String {
|
var windowTitle: String {
|
||||||
currentVideo.isNil ? "Not playing" : "\(currentVideo!.title) - \(currentVideo!.author)"
|
currentVideo.isNil ? "Not Playing" : "\(currentVideo!.title) - \(currentVideo!.author)"
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
func handleEnterForeground() {
|
func handleEnterForeground() {
|
||||||
@ -788,6 +789,7 @@ final class PlayerModel: ObservableObject {
|
|||||||
|
|
||||||
func updateNowPlayingInfo() {
|
func updateNowPlayingInfo() {
|
||||||
guard let video = currentItem?.video else {
|
guard let video = currentItem?.video else {
|
||||||
|
MPNowPlayingInfoCenter.default().nowPlayingInfo = .none
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user