Your message to get_iplayer awaits moderator approval

C E Macfarlane c.e.macfarlane at macfh.co.uk
Sun Nov 9 07:52:49 PST 2014


>     How about this in .profile?
>
>     alias get_iplayer="nice -19 get_iplayer"

I think ...

	alias gip='nice -n 19 get_iplayer'

... would be more correct(!), and also more convenient.

But the trouble is, I also sometimes like to run it in the foreground, if
I'm not expecting to be accessing the server as a client in the immediate
future, and I also have a gip.sh, which cycles through lists of programme
names, etc, looking for things to download that match my interests, and
downloading them if the -g switch is given.

Also, I don't want the developers to lose sight of this:

>     The part of the program finding external programs has had to
>     be rewritten to use nice.

Even without nice, I think this aspect of it would be worth incorporating
into get_iplayer, because, at the moment, the various tests for external
program existence and versions are scattered throughout the code.  My patch
at least searches for all the external binaries up front  -  I think for the
future it would be a good idea to test for the versions there as well  -
and sets the bin->{name} variable either to the path to each, or to a null
string if it wasn't found.  Subsequent tests in the code for the external
binary are then replaced by tests to see if the variable is non-null.
Besides being more efficient by saving some duplicated calls, doing all such
work in one section leads to more modular and therefore more easily
maintained code.




More information about the get_iplayer mailing list