Resume playing after output switch.

This commit is contained in:
Matthew Stratford 2020-11-01 03:19:21 +00:00
parent 1d7ccaee12
commit 435021536b
No known key found for this signature in database
GPG key ID: 9E53C8B3F0B57395

View file

@ -194,6 +194,7 @@ class Player():
self.state.update("paused", False) self.state.update("paused", False)
def output(self, name=None): def output(self, name=None):
wasPlaying = self.state.state["playing"]
self.quit() self.quit()
self.state.update("output", name) self.state.update("output", name)
try: try:
@ -205,6 +206,10 @@ class Player():
return False return False
self.load(self.state.state["filename"]) self.load(self.state.state["filename"])
if wasPlaying:
self.unpause()
return True return True
def _updateState(self, pos=None): def _updateState(self, pos=None):