553 and data[index] == 27 |
553 and data[index] == 27 |
554 and data[index + 1 : index + 4] == b"]0;" |
554 and data[index + 1 : index + 4] == b"]0;" |
555 ): |
555 ): |
556 if b"\x1b\\" in data[index + 4 :]: |
556 if b"\x1b\\" in data[index + 4 :]: |
557 # 'set window title' command detected: <Esc>]0;...<Esc>\ |
557 # 'set window title' command detected: <Esc>]0;...<Esc>\ |
558 # __IGNORE_WARNING_M891__ |
558 # __IGNORE_WARNING_M-891__ |
559 titleData = data[index + 4 :].split(b"\x1b\\")[0] |
559 titleData = data[index + 4 :].split(b"\x1b\\")[0] |
560 title = titleData.decode("utf-8") |
560 title = titleData.decode("utf-8") |
561 index += len(titleData) + 5 # one more is done at the end |
561 index += len(titleData) + 5 # one more is done at the end |
562 self.osdInfo.emit(title) |
562 self.osdInfo.emit(title) |
563 else: |
563 else: |