Hopefully fix MPC-HC CMD_NOWPLAYING spam bug

This commit is contained in:
Etoh 2014-04-20 21:00:17 +01:00
parent 8076f90e04
commit 227b667eb3

View File

@ -119,6 +119,8 @@ class MpcHcApi:
elif(cmd == self.CMD_NOWPLAYING): elif(cmd == self.CMD_NOWPLAYING):
value = re.split(r'(?<!\\)\|', value) value = re.split(r'(?<!\\)\|', value)
if self.filePath == value[3]:
return
self.filePath = value[3] self.filePath = value[3]
self.filePlaying = value[3].split('\\').pop() self.filePlaying = value[3].split('\\').pop()
self.fileDuration = float(value[4]) self.fileDuration = float(value[4])