Fix output hopping playback resume position

This commit is contained in:
Matthew Stratford 2021-04-24 22:03:54 +01:00
parent fc7906e246
commit 7c3721d3fd

View file

@ -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