Getting ready for ditching mpc 1.6.3
This commit is contained in:
parent
49d5be5050
commit
bb1dee345e
@ -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,))
|
||||
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user