PVR switch syntax - help please
Andy Bircumshaw
andy at networkned.co.uk
Mon Apr 9 05:45:57 EDT 2012
On 9 April 2012, at 09:57, Alastair wrote:
>>
>> I just add `get_iplayer --pvr` to my user crontab to run every morning at 2am. This will
>> execute all PVR searches and download any new shows that match the search and any
>> that have been individually queued up (using --pvr-queue).
>>
>> aB.
>
> Hi Andy,
> Many thanks. Yes my example was not correct and should have referred to a radio
> programme. I shall do some trials using your approach.
> It would also be good to know how --pvr-sceduler worked in due course.
I've never used it, but this looks self-explanatory to me:
$ get_iplayer --longhelp | grep pvr-sch
--pvr-scheduler <seconds> Runs the PVR using all saved PVR searches every <seconds>. Synonyms: --pvrscheduler
$
I imagine you'd want to put it in a wrapper script that checks the hasn't died, restarting it if necessary. You'll need to handle the case that the download has stalled and get_iplayer has sat frozen for hours or days - personally I wouldn't recommend this approach.
Putting `get_iplayer --pvr` in a crontab allows you to schedule the downloads for off-peak &/or unmetered hours.
Note that the various different versions of a program (flashhd, flashvhigh, flashhigh, flashstd &c) are NOT certain to posted to the iPlayer site simultaneously. It may be that the standard or high versions are posted before the vhigh or hd versions, perhaps by as much as several hours.
You probably need to account for this, which is easy using crontab - you just use the extended `get_iplayer --pvr --before 24` your actual crontab entry.
The cron daemon software supplied by your distro can easily be configured to email you a log of each job it completes. So, using the crontab approach, you are notified that there may be download problems if you wake up in the morning and you don't have an email of the completed get_iplayer output. Admittedly these emails are annoyingly long to scroll through - it takes perhaps as long as 20 seconds each day to scroll through one and check to see whether any downloads have failed halfway through.
aB.
More information about the get_iplayer
mailing list