Thread
:
Youtube browser - mYTube - released
View Single Post
Engmex
2010-04-11 , 20:39
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.
Quote & Reply
|
The Following User Says Thank You to Engmex For This Useful Post:
GeraldKo
Engmex
View Public Profile
Send a private message to Engmex
Find all posts by Engmex