Merge pull request #1232 from 1hitsong/fixScreensaver

This commit is contained in:
Charles Ewert 2023-04-26 20:38:51 -04:00 committed by GitHub
commit 4a5ad689c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,5 @@
sub init() sub init()
m.playReported = false m.playReported = false
m.top.disableScreenSaver = true
m.top.observeField("state", "audioStateChanged") m.top.observeField("state", "audioStateChanged")
end sub end sub
@ -10,6 +9,8 @@ sub audioStateChanged()
reportedPlaybackState = "update" reportedPlaybackState = "update"
m.top.disableScreenSaver = (currentState = "playing")
if currentState = "playing" and not m.playReported if currentState = "playing" and not m.playReported
reportedPlaybackState = "start" reportedPlaybackState = "start"
m.playReported = true m.playReported = true