diff --git a/syncplay/mpc_api.py b/syncplay/mpc_api.py index 9a76352..1311666 100644 --- a/syncplay/mpc_api.py +++ b/syncplay/mpc_api.py @@ -187,7 +187,7 @@ class MPC_API: elif(cmd == MPC_API_COMMANDS.CMD_NOWPLAYING): self.filepath = value.split('|')[3] self.fileplaying = value.split('|')[3].split('\\').pop() - self.fileduration = int(value.split('|')[4]) + self.fileduration = value.split('|')[4] if(self.callbacks.on_update_filename): thread.start_new_thread(self.callbacks.on_update_filename,(self.fileplaying,)) if(self.callbacks.on_update_file_duration): thread.start_new_thread(self.callbacks.on_update_file_duration,(self.fileduration,)) diff --git a/syncplay/players/mplayer.py b/syncplay/players/mplayer.py index a8a507e..1028fa3 100644 --- a/syncplay/players/mplayer.py +++ b/syncplay/players/mplayer.py @@ -142,7 +142,7 @@ class MplayerProtocol(LineProcessProtocol): self.setUpFileInPlayer() def mplayer_answer_length(self, value): - self.duration = int(math.floor(float(value))) #TODO: return float as it is once mpc is updated + self.duration = value self.fileupdatesteps += 1 if(self.fileupdatesteps == 3): self.setUpFileInPlayer()