Download speed and progress indicator
Jeremy Nicoll - ml gip
jn.ml.gti.91 at wingsandbeaks.org.uk
Tue Nov 7 09:46:17 PST 2017
On 2017-11-07 17:04, RS wrote:
> Does Perl distinguish between desktop and laptop machines?
I wouldn't think so.
Do you run these commands in a Windows cmd.exe command window, or do
you by any chance use some other form of terminal?
> If I run get_iplayer with --verbose I can get an instantaneous
> download speed indicator similar to the one we used to have.
>
> If I run it on my desktop machine it displays a single line which is
> continuously updated, like the indicator we used to have by default.
> If I run it on any of my laptops each update is on a new line. I
> presume that in the first case the line is terminated with a CR and in
> the other cases with a CR LF.
>
> The relevant code seems to be between lines 7206 and 7224. It calls
> main::logger with a string formatted by sprintf. If I don't set
> --verbose, so the else code is executed, all machines display a single
> continuously updated line. In both cases the line appears from the
> code to end with CR LF unless {crlf} doesn't mean what it appears to.
It doesn't mean what it looks like. There a line of code (in 3.06, if
that's what you use) that says:
my $crlf = ( $hide_progress || $opt->{logprogress} ) ? "\n" : "\r";
ie setting it to either LF or CR depending on whether those named vars
are set or not. You'd need to look more closely at the perl to find
out under what circumstances they're set one way or another.
--
Jeremy Nicoll - my opinions are my own
More information about the get_iplayer
mailing list