Thread
:
Youtube browser - mYTube - released
View Single Post
Engmex
2010-04-11 , 04:15
Posts: 28 | Thanked: 9 times | Joined on Nov 2009
#
286
Well by messing with the script a bit and adding the code below at line 360 I now have a byte count on the std out, but unfortunately Mplayer still doesn't launch automatically. I guess there is something wrong with the byte count format.
Line 355
def report_progress(self, percent_str, data_len_str, speed_str, eta_str):
"""Report download progress."""
if self.params.get('noprogress', False):
return
#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 = int(((data_len_str*1048576)/100)*percent_str)
self.to_stdout(u'\nRetrieving video data: %5s%% (%8s of %sM) at %8s/s ETA %s ' %
(percent_str, counter, data_len_str, speed_str, eta_str), skip_eol=True)
#END ENGMEX
def report_resuming_byte(self, resume_len):
"""Report attemtp to resume at given byte."""
self.to_stdout(u'[download] Resuming download at byte %s' % resume_len)
Quote & Reply
|
Engmex
View Public Profile
Send a private message to Engmex
Find all posts by Engmex