Resume playing after output switch.
This commit is contained in:
parent
1d7ccaee12
commit
435021536b
1 changed files with 5 additions and 0 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue