#31: Initial support.

This commit is contained in:
Bill Dengler 2015-05-11 19:41:19 -04:00
parent 6f4501940e
commit 8d873674ee

View File

@ -226,6 +226,7 @@ class Controller(object):
self.create_ignored_session_buffer(session_.sessions[i]) self.create_ignored_session_buffer(session_.sessions[i])
continue continue
self.create_buffers(session_.sessions[i]) self.create_buffers(session_.sessions[i])
# Connection checker executed each minute. # Connection checker executed each minute.
self.checker_function = RepeatingTimer(60, self.check_connection) self.checker_function = RepeatingTimer(60, self.check_connection)
self.checker_function.start() self.checker_function.start()
@ -235,6 +236,7 @@ class Controller(object):
for i in session_.sessions: for i in session_.sessions:
if session_.sessions[i].is_logged == False: continue if session_.sessions[i].is_logged == False: continue
self.start_buffers(session_.sessions[i]) self.start_buffers(session_.sessions[i])
self.set_buffer_positions(session_.sessions[i])
if config.app["app-settings"]["play_ready_sound"] == True: if config.app["app-settings"]["play_ready_sound"] == True:
session_.sessions[session_.sessions.keys()[0]].sound.play("ready.ogg") session_.sessions[session_.sessions.keys()[0]].sound.play("ready.ogg")
if config.app["app-settings"]["speak_ready_msg"] == True: if config.app["app-settings"]["speak_ready_msg"] == True:
@ -353,6 +355,12 @@ class Controller(object):
buffer.timer = RepeatingTimer(300, buffer.start_stream) buffer.timer = RepeatingTimer(300, buffer.start_stream)
buffer.timer.start() buffer.timer.start()
def set_buffer_positions(self,session):
"Sets positions for buffers if values exist in the database."
for i in self.buffers:
if str(i.name+"_pos") in session.db and hasattr(i.buffer,'list'):
i.buffer.list.select_item(session.db[str(i.name+"_pos")])
def logout_account(self, session_id): def logout_account(self, session_id):
for i in session_.sessions: for i in session_.sessions:
if session_.sessions[i].session_id == session_id: session = session_.sessions[i] if session_.sessions[i].session_id == session_id: session = session_.sessions[i]