mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-03-06 09:27:33 +01:00
Sesiones
This commit is contained in:
@@ -1368,11 +1368,12 @@ class Controller(object):
|
|||||||
session = bf.session
|
session = bf.session
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
|
is_blueski = (getattr(session, "KIND", None) == "blueski" or getattr(session, "type", None) == "blueski")
|
||||||
|
|
||||||
def do_update_sync():
|
def do_update_sync():
|
||||||
new_ids = []
|
new_ids = []
|
||||||
try:
|
try:
|
||||||
if session.KIND == "blueski":
|
if is_blueski:
|
||||||
if hasattr(bf, "start_stream"):
|
if hasattr(bf, "start_stream"):
|
||||||
count = bf.start_stream(mandatory=True)
|
count = bf.start_stream(mandatory=True)
|
||||||
if count: new_ids = [str(x) for x in range(count)]
|
if count: new_ids = [str(x) for x in range(count)]
|
||||||
@@ -1397,7 +1398,7 @@ class Controller(object):
|
|||||||
log.exception("Error updating buffer %s", bf.name)
|
log.exception("Error updating buffer %s", bf.name)
|
||||||
wx.CallAfter(output.speak, _("An error occurred while updating the buffer."), True)
|
wx.CallAfter(output.speak, _("An error occurred while updating the buffer."), True)
|
||||||
|
|
||||||
if session.KIND == "blueski":
|
if is_blueski:
|
||||||
threading.Thread(target=do_update_sync).start()
|
threading.Thread(target=do_update_sync).start()
|
||||||
else:
|
else:
|
||||||
# Original async logic for others if needed, but likely they are sync too.
|
# Original async logic for others if needed, but likely they are sync too.
|
||||||
|
|||||||
Reference in New Issue
Block a user