Further Questions re Syntax

Andy Bircumshaw andy at networkned.co.uk
Sun Apr 22 02:17:36 EDT 2012


On 22 April 2012, at 00:05, Alastair wrote:

> Hi and many thanks to Andy et al for answering my dumb questions.  I have another which I 
> suspect is a Regex issue but how should I deal with  colon ":" in a search string.  All appears 
> as it should in the search0 = line of the pvr list but in the first line, pvrsearch = the colon has 
> gone.

Sorry, could you clarify a little, please?

Searching for colons seems to be working fine here:

$ get_iplayer --fields name | grep ^INFO
INFO: 910 Matching Programmes
$ get_iplayer --fields name ':' | grep ^INFO
INFO: 414 Matching Programmes
$ get_iplayer --fields name "mum" | grep ^INFO
INFO: 1 Matching Programmes
$ get_iplayer --fields name "mum:" | grep ^INFO
INFO: 1 Matching Programmes
$ get_iplayer --fields name zingzilla | grep ^INFO
INFO: 9 Matching Programmes
$ get_iplayer --fields name zingzilla: | grep ^INFO
INFO: 0 Matching Programmes
$ get_iplayer --fields name zingzillas: | grep ^INFO
INFO: 2 Matching Programmes
$ 

If you're on Windows you might need to "quote" the 'search string', but you can see that doesn't seem to be a problem on Linux.

I have a couple of existing PVR searches using colons:

$ get_iplayer --pvr-list | grep -C 1 :

All PVR Searches:

--
pvrsearch = Ideal_-_dopehead_sitcom
        search0 = Ideal: Series

--
pvrsearch = The_Ones_-_standup_comedy_series_one_episode_per_comedian
        search0 = ^The Ones: Series .$

$ 

I think I only use these because they match Ideal (the dopehead sitcom) whilst ignoring other programmes containing the word (such as "Ideal Living Today" or "Highlights of the Ideal Home Exhibition"). 

The ^ is regrex for "start of line". The dopehead sitcom search would be better constructed "^Ideal: Series"
(or even "^Ideal: Series .*" - but would that match "series 10"?)

It is unfortunate that the BBC place the word "series" in the program title - I think they should list programmes so that "^Ideal$" matches all series of the show (and "^Have I Got News For You$" and "^Being Human$" likewise). I think they may have been inconsistent in the past about this convention, but I can't immediately find evidence of this in my download_history file.

> I do not know BBC policy for adding HD version but even a delay of 24 hours may not 
> guarantee getting the best mode.  Would it be possible, for a given search string, to 
> compare what had already been downloaded with what was available.

Nope, I don't believe there's any way built-in to get_iplayer to do this. I'm sure dinkypumkin will know better than me if I'm mistaken, though.

I have no idea how difficult this would be to add. The file quality of previously downloaded shows is in the download_history, but I can see some other issues.

Unfortunately, the BBC do not always post all versions. AIUI this happens when their own overnight transcoding batch jobs fail. You can contact them through iPlayer's reporting system and they'll *sometimes* put the file up after a couple of days. You have to be careful when reporting *not* to mention get_iplayer - I think you first need to install the BBC "iPlayer Desktop" program (probably easiest to do on Windows or a Mac) and then confirm using that (or the web-interface) that the "download" or "download in HD" options are unavailable. Submit *that* problem as the report and, if the BBC fix it, then it'll also become available to get_iplayer.

aB.





More information about the get_iplayer mailing list