Fixed crashes when trying to open YouTube videos with emojis

This commit is contained in:
Bobo 2020-06-22 21:25:51 +03:00
parent b71f076bbb
commit 416e553dfa

View File

@ -1,6 +1,7 @@
import os.path
import re
import string
import time
import threading
import _thread
@ -91,7 +92,7 @@ class MpcHcApi:
cmessage = __OSDDATASTRUCT()
cmessage.nMsgPos = MsgPos
cmessage.nDurationMS = DurationMs
cmessage.strMsg = message
cmessage.strMsg = ''.join(filter(lambda x: x in string.printable, message))
self.__listener.SendCommand(self.CMD_OSDSHOWMESSAGE, cmessage)
def sendRawCommand(self, cmd, value):