Further Questions re Syntax

dinkypumpkin dinkypumpkin at gmail.com
Sun Apr 22 14:29:48 EDT 2012


On 22/04/2012 07:17, Andy Bircumshaw wrote:
> 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.

Ignore that.  The value of "pvrsearch" is used as the name of a file 
that contains all the parameters for a given PVR search.  Since colons 
may not be used in file names on some systems, they are stripped.

>> 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.

Flattery will get you everywhere.

> 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.

This would be something like combining --history with --info.  It might 
be possible, but awkward to implement.  It would also have to be limited 
since --info fires off a request to the iPlayer site for every programme 
in the search results, which can slow things down.  This wouldn't save 
you many keystrokes since you can just run with --history and then with 
--info yourself (see below).  It seems like quite a special case to me.

I handle this particular situation with a brute force approach.  With 
any series for which I want to be sure to get the HD version if 
available, I set up 2 pvr searches, one HD-only and one with any other 
modes.  I put <mode> in the file prefix to avoid collisions.   That 
means I wind up with two versions of each episode, which is admittedly a 
bit wasteful of bandwidth and storage.  But then I rarely want HD 
versions.  If I queue individual episodes, I give the non-HD search a 
longer --before value to give me a chance to check if the HD version has 
downloaded and, if so, delete the non-HD search.

Back to the subject at hand -

As Andy says, the file quality of previous downloads is in the download 
history.  However, you appear to be using the web interface, which can't 
fully accommodate what you want to do.  You can search the download 
history like so:

1. In the Search page, check "Search History"
2. In the Columns tab, check "Mode"
3. Click Apply Settings
4. Enter your search string and click Search

This will show you a list of the programmes you have already downloaded 
that match the search condition.  This list will include the file 
quality (Mode), which isn't included by default.

However, the web interface can't tell you if there is a HD version 
available. The best you can do with the web interface is find the 
programme you want to re-download (assuming the HD version didn't 
download the first time) and force a fresh download (In Recording tab, 
select "Force Recording" ON) in the hope of picking up the HD version. 
Before you do that, move the previously downloaded file to a safe 
location.  The web interface can't overwrite previous downloads.  You 
can also add a fileprefix setting in your options file to avoid such 
filename collisions (see below).  The web interface doesn't provide a 
way to change it.  You could, however, use "Override Recordings Folder" 
to put your new downloads in a different location and thus also avoid 
filename collisions.


A command line version:

Search the download history, returning PID and file quality along with 
programme name/episode:

get_iplayer --listformat "<pid> - <mode> - <name> - <episode>" --history 
"search string"

Get detailed info on available programmes matching same search string to 
see if HD version is available ("modes:" entry):

get_iplayer --info "search string"

However, you probably want to be more specific and return detailed info 
only for the particular programme of interest, so just look up the PID:

get_iplayer --info --fields pid PID

If HD version is now available, force a re-download:

get_iplayer --force --modes flashhd --pid PID --fileprefix "<name> - 
<episode> <pid> <version> <mode>"

The --fileprefix value should prevent overwriting any previous non-HD 
downloads (via inclusion of <mode>).






More information about the get_iplayer mailing list