Further Questions re Syntax

Andy Bircumshaw andy at networkned.co.uk
Mon Apr 23 11:37:37 EDT 2012


On 23 April 2012, at 09:06, Alastair wrote:
>> I do not know BBC policy for adding HD version but even a delay of 24 hours may not 
> guarantee getting the best mode and it is very arbitrary as they do not always post hd 
> version.  
> 
> My thought was, for a given search string, to have get_iplayer compare what had already 
> been downloaded with what was available.  In this way using the fallback modes approach 
> suggested by Andy which is working fine, it would always get the best mode, whenever it 
> was added to server.

The immediate question that springs to my mind is about what happens to completed searches.

If I queue up PID b01gw5vj for download using `get_iplayer --pvrqueue ewan` then the best quality version currently available is downloaded and the search deleted. If a higher quality version of this subsequently becomes available, how to find it?

I guess this may not matter for ongoing searches - if I add instead `get_iplayer ewan --pvradd "Search for programmes about guys named Ewan"` then get_iplayer can check against download history (as it does already) and only refuse to download the programme if it's already been downloaded (as it does already) *and also* if no higher quality version has been downloaded.

Another alternative is just to have the get_iplayer go through every programme in its download_history, check that PID available and download it if a higher quality version is now available. If the BBC were to upgrade their archive to HD, this could result in you downloading hundreds of shows!

Another question that arises, however, is whether you really want get_iplayer to redownload a programme that you have already watched.

It's worth mentioning here that Phil Lewis, the original author of get_iplayer, had quite a clear perspective on get_iplayer as a "fair use" solution to "time-shifting" TV viewing.

That's why he made it delete programmes over 30 days old.

You could run `get_iplayer --nopurge --prefs-add` and never have get_iplayer do this. 

If we consider the analogy of taping a show using your VHS recorder (because you'll be out at the pub when the show is recorded and you want to watch it the next day) then you probably have a dozen or so VHS tapes which you recycle by recording over them after you've watched whatever you recorded on them.

In the VHS days you probably didn't have a massive library of thousands of blank VHS tapes, recording everything you might happen to be interested in, never deleting them, and making sure to re-record the highest quality version if it became newly available.

I'm not saying that there's anything wrong with caching recorded shows for re-viewing, but Phil clearly approached his get_iplayer development with the Terms Of Use of the BBC's official iPlayer in mind. He ceased development when the BBC management stated that they disapproved of unauthorised tools such as get_iplayer (or when he interpreted them to do so).

I don't agree with him that we should all kowtow to the BBC, and to them telling us what to do (especially because the BBC's policies are a result of them kowtowing to Hollywood), but it's worth being aware of the assumptions made when get_iplayer was written.

If we follow the VHS metaphor, your suggestion might lead to us redownloading a show which we watched and deleted months ago, just because it happens to be rerun at a higher video quality.

I'd like to rewrite get_iplayer from scratch, with my own set of usage assumptions and a clean codebase, but I can't say that I've got the time, even if I've got the skills (which is uncertain).

> Finally on another problem, because at present I am having some difficulties with my 
> internal mail I am not getting logs from cron jobs.  How can I get the cron get_iplayer job to 
> run in a console so I can see what is going on when I return to machine please?

Delete or comment out the cronjob, open a terminal and run `get_iplayer --pvr`. If you have peak / off-peak bandwidth limitations then run `sleep 4h && get_iplayer --pvr` (where 4h is 4 hours, for example). 

You could probably do something more sophisticated having the cronjob create a tmux session and run in there, but the above'll keep you going until you fix your cron email issues.

aB.




More information about the get_iplayer mailing list