Automatic Downloading of Regular Episodes

Andy Waddington (software devel) acornqa at pennine.demon.co.uk
Wed Sep 26 14:26:51 EDT 2012


Sometime before sending, Chris J Brady typed (and on Wednesday 2012-09-26 sent):
> If I am away for some weeks is there any way I can download
> regular programmes, e.g. the weekly Dad's Army on Radio 4 Extra

If you can find the programmes uniquely with a search string, then you
can download them with pvr. I run my pvr jobs overnight, every night,
and I have a couple of years' worth of backlog of programmes to listen
to - especially from periods when I'm away from home for several weeks.

I have a file called /etc/cron.daily/getiplayerpvr which contains
(amongst some other stuff to do various amounts of permissions-bashing
and name-clarifying...)

#!/bin/bash

# get all the programmes that meet our defined criteria and haven't yet been downloaded

/usr/local/bin/get_iplayer --nopurge --pvr 2>>/var/log/iplayerpvr.log

# (iplayerpvr.log is under the logrotate cron job, so may be iplayerpvr.log.1 by
# the time you need to read it next morning...)

# keep a check of the index files used so we can scan for new programmes we are
# not searching for on pvr.

/usr/local/bin/get_iplayer --nopurge --type=tv > /home/Photos/video/BBC/tvindex 2>&1
/usr/local/bin/get_iplayer --nopurge --type=itv > /home/Photos/video/ITV/tvindex 2>&1
/usr/local/bin/get_iplayer --nopurge --type=radio > /home/pub/shared/Radio/radioindex 2>&1
/usr/local/bin/get_iplayer --nopurge --type=podcast > /home/pub/shared/Radio/podcastindex 2>&1

...


The --nopurge lines stop getiplayer from casually discarding programmes
before you've come back from holiday (or, indeed, ever).

I suspect that the "type=itv" line hasn't been working for some years, but
it is still in there, which shows how stable and maintenance-free this sort
of thing is :-)

The /home/pub/shared/Radio directory is looked at by Amarok and Clementine
over an NFS share, so I can play any of the programmes (and fiddle with tags)
on any machine on our house net (particuarly the NetBook which acts as the
house music system in the kitchen:)

I'm sure Windows systems can be bludgeoned to have similar functionality...
but may not keep on doing the job unattended for several years at a time
(the low-power PC that does my getiplayer stuff is a headless EeePC that I
don't touch more than a couple of times a year).

Andy



More information about the get_iplayer mailing list