mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-23 03:38:08 -06:00
#31: Refactored solution.
This commit is contained in:
parent
f241a1fc31
commit
3f63046cbb
@ -411,7 +411,7 @@ class baseBufferController(bufferController):
|
|||||||
self.session.sound.play("audio.ogg")
|
self.session.sound.play("audio.ogg")
|
||||||
if utils.is_geocoded(tweet):
|
if utils.is_geocoded(tweet):
|
||||||
self.session.sound.play("geo.ogg")
|
self.session.sound.play("geo.ogg")
|
||||||
|
self.session.db[str(self.name+"_pos")]=self.buffer.list.get_selected()
|
||||||
@_tweets_exist
|
@_tweets_exist
|
||||||
def audio(self):
|
def audio(self):
|
||||||
tweet = self.get_tweet()
|
tweet = self.get_tweet()
|
||||||
|
@ -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])
|
||||||
|
self.set_buffer_positions(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)
|
||||||
@ -236,7 +237,6 @@ 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:
|
||||||
@ -870,8 +870,7 @@ class Controller(object):
|
|||||||
pass
|
pass
|
||||||
if position == page.buffer.list.get_selected():
|
if position == page.buffer.list.get_selected():
|
||||||
page.session.sound.play("limit.ogg")
|
page.session.sound.play("limit.ogg")
|
||||||
else:
|
|
||||||
page.session.db[page.name+"_pos"]=index
|
|
||||||
try:
|
try:
|
||||||
output.speak(page.get_message(), True)
|
output.speak(page.get_message(), True)
|
||||||
except:
|
except:
|
||||||
@ -890,8 +889,6 @@ class Controller(object):
|
|||||||
pass
|
pass
|
||||||
if position == page.buffer.list.get_selected():
|
if position == page.buffer.list.get_selected():
|
||||||
page.session.sound.play("limit.ogg")
|
page.session.sound.play("limit.ogg")
|
||||||
else:
|
|
||||||
page.session.db[page.name+"_pos"]=index
|
|
||||||
try:
|
try:
|
||||||
output.speak(page.get_message(), True)
|
output.speak(page.get_message(), True)
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user