Mercurial > code > home > repos > light9
changeset 2115:bd287d68edd6
disable autostop
author | drewp@bigasterisk.com |
---|---|
date | Thu, 02 Jun 2022 19:22:05 +0000 |
parents | 758ce4dfbd2f |
children | f38ecdcd368e |
files | light9/ascoltami/main.py light9/ascoltami/player.py light9/ascoltami/webapp.py |
diffstat | 3 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/ascoltami/main.py Thu Jun 02 19:21:46 2022 +0000 +++ b/light9/ascoltami/main.py Thu Jun 02 19:22:05 2022 +0000 @@ -26,7 +26,7 @@ def __init__(self, graph, show): self.graph = graph - self.player = Player(onEOS=self.onEOS) + self.player = Player(onEOS=self.onEOS, autoStopOffset=0) self.show = show self.playlist = Playlist.fromShow(graph, show)
--- a/light9/ascoltami/player.py Thu Jun 02 19:21:46 2022 +0000 +++ b/light9/ascoltami/player.py Thu Jun 02 19:22:05 2022 +0000 @@ -170,6 +170,8 @@ """ are we stopped at the autostop time? """ + if self.autoStopOffset < .01: + return False pos = self.currentTime() autoStop = self.duration() - self.autoStopOffset return not self.isPlaying() and abs(
--- a/light9/ascoltami/webapp.py Thu Jun 02 19:21:46 2022 +0000 +++ b/light9/ascoltami/webapp.py Thu Jun 02 19:22:05 2022 +0000 @@ -33,7 +33,14 @@ def get(self): self.set_header("Content-Type", "application/json") - self.write(json.dumps(dict(host=socket.gethostname(), times={'intro': 4, 'post': 4}))) + self.write( + json.dumps(dict( + host=socket.gethostname(), + times={ + # these are just for the web display. True values are on Player.__init__ + 'intro': 4, + 'post': 0 + }))) def playerSongUri(graph, player):