View Single Post
Posts: 28 | Thanked: 9 times | Joined on Nov 2009
#289
Good news! I think I have it working. I made a silly mistake and was converting to bytes instead of kilobytes here is the new code:
#CHANGED BY ENGMEX
percent_str = percent_str.rstrip('%')
percent_str = float(percent_str)
data_len_str = data_len_str.rstrip('M')
data_len_str = float(data_len_str)
counter = float(((data_len_str*1024)/100)*percent_str)
if counter < 1024:
self.to_stdout(u'\nRetrieving video data: %5s%% (%8.2fk of %sM) at %8s/s ETA %s ' %
(percent_str, counter, data_len_str, speed_str, eta_str), skip_eol=True)
else:
counter = counter/1024
self.to_stdout(u'\nRetrieving video data: %5s%% (%8.2fM of %sM) at %8s/s ETA %s ' %
(percent_str, counter, data_len_str, speed_str, eta_str), skip_eol=True)
#END ENGMEX
I will try and upload the file somewhere so that the rest of you can download it.
 

The Following User Says Thank You to Engmex For This Useful Post: