get_iplayer Digest, Vol 24, Issue 20

Alastair ajebay at errichel.co.uk
Mon Apr 23 04:06:37 EDT 2012


>Message: 1
>Date: Sun, 22 Apr 2012 19:29:48 +0100
>From: dinkypumpkin <dinkypumpkin at gmail.com>
>To: get_iplayer at lists.infradead.org
>Subject: Re: Further Questions re Syntax
>Message-ID: <4F944E1C.5050907 at gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>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>).

Hi dinkypumpkin and many thanks for your detailed replies.  Your later post is correct, I do 
not use web interface and the problem I had with the lock file was entirely do to my luddite 
attempts to stop a process.  I have cleaned up now and all is well.
  
Referring to the pvr hd issue, you refer to a brute force approach but for my purposes it is 
too much hands on.  My not very sophisticated suggestion was an attempt to think through 
a hands off approach.  

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.  

OK it might not be the fastest approach but could run unattended and suits the cron job 
approach.  If it results in two versions then I do not mind sorting that out manually as it is 
quick and non critical.

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?

Many thanks again for your help.



More information about the get_iplayer mailing list