mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
#31: Initial support.
This commit is contained in:
parent
6f4501940e
commit
8d873674ee
@ -226,6 +226,7 @@ class Controller(object):
|
||||
self.create_ignored_session_buffer(session_.sessions[i])
|
||||
continue
|
||||
self.create_buffers(session_.sessions[i])
|
||||
|
||||
# Connection checker executed each minute.
|
||||
self.checker_function = RepeatingTimer(60, self.check_connection)
|
||||
self.checker_function.start()
|
||||
@ -235,6 +236,7 @@ class Controller(object):
|
||||
for i in session_.sessions:
|
||||
if session_.sessions[i].is_logged == False: continue
|
||||
self.start_buffers(session_.sessions[i])
|
||||
self.set_buffer_positions(session_.sessions[i])
|
||||
if config.app["app-settings"]["play_ready_sound"] == True:
|
||||
session_.sessions[session_.sessions.keys()[0]].sound.play("ready.ogg")
|
||||
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.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):
|
||||
for i in session_.sessions:
|
||||
if session_.sessions[i].session_id == session_id: session = session_.sessions[i]
|
||||
|
Loading…
Reference in New Issue
Block a user