From 2bd3dda9dfa194c6c44b66080af8d362e8e26b90 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sat, 24 Apr 2021 21:31:35 +0100 Subject: [PATCH] Fix loading to start if no cue point. --- player.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/player.py b/player.py index 10b23e3..b72348a 100644 --- a/player.py +++ b/player.py @@ -386,6 +386,8 @@ class Player: if loaded_item.cue > 0: self.seek(loaded_item.cue) + else: + self.seek(0) if self.state.get()["play_on_load"]: self.play() @@ -605,7 +607,7 @@ class Player: self.state.update("initialised", self.isInit) if self.isInit: if pos is not None: - #self.state.update("pos_true", max(0, pos)) + # Seeking sets the position like this when not playing. self.state.update("pos", pos) # Reset back to 0 if stopped. self.state.update("pos_offset", 0) elif self.isPlaying: