Fix output hopping playback resume position
This commit is contained in:
parent
fc7906e246
commit
7c3721d3fd
1 changed files with 2 additions and 1 deletions
|
@ -424,6 +424,7 @@ class Player:
|
||||||
|
|
||||||
def output(self, name: Optional[str] = None):
|
def output(self, name: Optional[str] = None):
|
||||||
wasPlaying = self.state.get()["playing"]
|
wasPlaying = self.state.get()["playing"]
|
||||||
|
oldPos = self.state.get()["pos_true"]
|
||||||
|
|
||||||
name = None if (not name or name.lower() == "none") else name
|
name = None if (not name or name.lower() == "none") else name
|
||||||
|
|
||||||
|
@ -444,7 +445,7 @@ class Player:
|
||||||
if loadedItem:
|
if loadedItem:
|
||||||
self.load(loadedItem.weight)
|
self.load(loadedItem.weight)
|
||||||
if wasPlaying:
|
if wasPlaying:
|
||||||
self.unpause()
|
self.play(oldPos)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue