Fix play on load not starting from cue point.
This commit is contained in:
parent
9ec11c2691
commit
ff2c8f0b8e
1 changed files with 3 additions and 11 deletions
12
player.py
12
player.py
|
@ -395,7 +395,7 @@ class Player:
|
||||||
self.seek(0)
|
self.seek(0)
|
||||||
|
|
||||||
if self.state.get()["play_on_load"]:
|
if self.state.get()["play_on_load"]:
|
||||||
self.play()
|
self.unpause()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -581,26 +581,18 @@ class Player:
|
||||||
self.play()
|
self.play()
|
||||||
return
|
return
|
||||||
|
|
||||||
loaded_new_item = False
|
|
||||||
# Auto Advance
|
# Auto Advance
|
||||||
if self.state.get()["auto_advance"]:
|
if self.state.get()["auto_advance"]:
|
||||||
for i in range(len(self.state.get()["show_plan"])):
|
for i in range(len(self.state.get()["show_plan"])):
|
||||||
if self.state.get()["show_plan"][i].weight == loaded_item.weight:
|
if self.state.get()["show_plan"][i].weight == loaded_item.weight:
|
||||||
if len(self.state.get()["show_plan"]) > i + 1:
|
if len(self.state.get()["show_plan"]) > i + 1:
|
||||||
self.load(self.state.get()["show_plan"][i + 1].weight)
|
self.load(self.state.get()["show_plan"][i + 1].weight)
|
||||||
loaded_new_item = True
|
return
|
||||||
break
|
|
||||||
|
|
||||||
# Repeat All
|
# Repeat All
|
||||||
# TODO ENUM
|
# TODO ENUM
|
||||||
elif self.state.get()["repeat"] == "all":
|
elif self.state.get()["repeat"] == "all":
|
||||||
self.load(self.state.get()["show_plan"][0].weight)
|
self.load(self.state.get()["show_plan"][0].weight)
|
||||||
loaded_new_item = True
|
|
||||||
break
|
|
||||||
|
|
||||||
# Play on Load
|
|
||||||
if self.state.get()["play_on_load"] and loaded_new_item:
|
|
||||||
self.play()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# No automations, just stop playing.
|
# No automations, just stop playing.
|
||||||
|
|
Loading…
Reference in a new issue