Getting ready for ditching mpc 1.6.3

This commit is contained in:
Uriziel 2012-10-01 21:41:34 +02:00
parent 49d5be5050
commit bb1dee345e
2 changed files with 2 additions and 2 deletions

View File

@ -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,))

View File

@ -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()