mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
set playingFullscreen to proper value
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
parent
64a18678ce
commit
8e97d3f42f
@ -7,6 +7,7 @@ final class PlayerSettingsGroupExporter: SettingsGroupExporter {
|
||||
"playerInstanceID": Defaults[.playerInstanceID] ?? "",
|
||||
"pauseOnHidingPlayer": Defaults[.pauseOnHidingPlayer],
|
||||
"closeVideoOnEOF": Defaults[.closeVideoOnEOF],
|
||||
"exitFullscreenOnEOF": Defaults[.exitFullscreenOnEOF],
|
||||
"expandVideoDescription": Defaults[.expandVideoDescription],
|
||||
"collapsedLinesDescription": Defaults[.collapsedLinesDescription],
|
||||
"showChapters": Defaults[.showChapters],
|
||||
|
@ -17,6 +17,10 @@ struct PlayerSettingsGroupImporter {
|
||||
Defaults[.closeVideoOnEOF] = closeVideoOnEOF
|
||||
}
|
||||
|
||||
if let exitFullscreenOnEOF = json["exitFullscreenOnEOF"].bool {
|
||||
Defaults[.exitFullscreenOnEOF] = exitFullscreenOnEOF
|
||||
}
|
||||
|
||||
if let expandVideoDescription = json["expandVideoDescription"].bool {
|
||||
Defaults[.expandVideoDescription] = expandVideoDescription
|
||||
}
|
||||
|
@ -123,9 +123,7 @@ extension PlayerBackend {
|
||||
if Defaults[.closeVideoOnEOF] {
|
||||
model.resetQueue()
|
||||
model.hide()
|
||||
}
|
||||
|
||||
if !Defaults[.closeVideoOnEOF], Defaults[.exitFullscreenOnEOF], model.playingFullScreen {
|
||||
} else if Defaults[.exitFullscreenOnEOF], model.playingFullScreen {
|
||||
model.exitFullScreen()
|
||||
}
|
||||
#endif
|
||||
|
@ -1001,6 +1001,7 @@ final class PlayerModel: ObservableObject {
|
||||
|
||||
logger.info("entering fullscreen")
|
||||
toggleFullscreen(false, showControls: showControls)
|
||||
self.playingFullScreen = true
|
||||
}
|
||||
|
||||
func exitFullScreen(showControls: Bool = true) {
|
||||
@ -1008,6 +1009,7 @@ final class PlayerModel: ObservableObject {
|
||||
|
||||
logger.info("exiting fullscreen")
|
||||
toggleFullscreen(true, showControls: showControls)
|
||||
self.playingFullScreen = false
|
||||
}
|
||||
|
||||
func updateNowPlayingInfo() {
|
||||
|
@ -75,6 +75,7 @@ extension Defaults.Keys {
|
||||
static let expandVideoDescription = Key<Bool>("expandVideoDescription", default: expandVideoDescriptionDefault)
|
||||
|
||||
static let collapsedLinesDescription = Key<Int>("collapsedLinesDescription", default: 5)
|
||||
static let exitFullscreenOnEOF = Key<Bool>("exitFullscreenOnEOF", default: true)
|
||||
|
||||
static let showChapters = Key<Bool>("showChapters", default: true)
|
||||
static let showChapterThumbnails = Key<Bool>("showChapterThumbnails", default: true)
|
||||
|
Loading…
Reference in New Issue
Block a user