diff --git a/player.py b/player.py index 90597b1..671280b 100644 --- a/player.py +++ b/player.py @@ -297,9 +297,10 @@ class Player(): def output(self, name=None): wasPlaying = self.state.state["playing"] + name = None if name == "none" else name + self.quit() self.state.update("output", name) - self.state.update("loaded_item", None) try: if name: mixer.init(44100, -16, 2, 1024, devicename=name) @@ -309,6 +310,9 @@ class Player(): self.logger.log.exception("Failed to init mixer with device name: " + str(name)) return False + loadedItem = self.state.state["loaded_item"] + if (loadedItem): + self.load(loadedItem.timeslotitemid) if wasPlaying: self.unpause() diff --git a/templates/config.html b/templates/config.html index 7f37597..33f5e8d 100644 --- a/templates/config.html +++ b/templates/config.html @@ -1,8 +1,9 @@ {% extends 'base.html' %} {% block content_inner %} + Set Channel 0 Set Channel 1 Set Channel 2 - System Default Output
{% for output in data.outputs %} Set Channel 0 Set Channel 1 Set Channel 2 - {{output.name}}
{% endfor %}
-{% endblock %} \ No newline at end of file +{% endblock %}