557 ): |
557 ): |
558 if b"\x1b\\" in data[index + 4 :]: |
558 if b"\x1b\\" in data[index + 4 :]: |
559 # 'set window title' command detected: <Esc>]0;...<Esc>\ |
559 # 'set window title' command detected: <Esc>]0;...<Esc>\ |
560 # __IGNORE_WARNING_M891__ |
560 # __IGNORE_WARNING_M891__ |
561 titleData = data[index + 4 :].split(b"\x1b\\")[0] |
561 titleData = data[index + 4 :].split(b"\x1b\\")[0] |
562 title = titleData.decode() |
562 title = titleData.decode("utf-8") |
563 index += len(titleData) + 5 # one more is done at the end |
563 index += len(titleData) + 5 # one more is done at the end |
564 self.osdInfo.emit(title) |
564 self.osdInfo.emit(title) |
565 else: |
565 else: |
566 # data is incomplete; buffer and stop processing |
566 # data is incomplete; buffer and stop processing |
567 self.__replBuffer = data[index:] |
567 self.__replBuffer = data[index:] |