I wish to extend my thanks to Ross and User Name, the fix described here is working fairly well. The patch as described works on my Raspberry Pi with get_iplayer version 2.88

edit /usr/bin/get_iplayer and modify as described.

I was then able to refresh with
get_iplayer --refresh --type=radio --refreshfuture
get_iplayer --refresh --type=TV --refreshfuture

and then run my pvr search with get_iplayer --pvr


I have many PVR search strings, to pick up radio comedy shows and things that interest me, eg Sherlock Holmes. It is this last part that I find get_iplayer so useful for - I have listened to a number of radio programmes discussing or about Sherlock Holmes and other interests that I would have entirely missed if it wasn't for the search capabilities of get_iplayer.

I do hope this fix, or a variant thereof, can be included in a new update soon. It's better than nothing !

Interestingly, I notice that whilst most of the episode numbers are messed up, not all of them are.

After running my pvr, I downloaded the following radio programmes :

Count Arthur Strong S06E00 (Should be E05)
Down The Line S03E00 (Should be E04)
Heresy S08E01 (unsure at the moment)
The Burkiss Way S04E00 (Probably E01)
The Unbelievable Truth S05E05 (seemingly correct)

I wonder why the last one was correctly named and the others weren't?

Ian



-----Original Message----- From: Ross
Sent: Friday, October 31, 2014 10:20 AM
To: Roger Bell_West
Cc: [email protected]
Subject: Re: A message from Auntie

The feeds are gone, but at least for now the bbc schedules are still there. I am not sure you need scraping … yet.

Here is one of the schedules: http://www.bbc.co.uk/bbctwo/programmes/schedules/hd/this_week.xml

This gives an option for an immediate workaround to get the pvr going again (as already pointed out by User name), and also potentially gives a longer term solution.

As a side note I looked at this stuff a week ago to see how easy it would be to extend the search for 30 days, and I believe the schedule data will allow us to do that.

WORKAROUND:

I will quote User Name. I also have this running on my machine, only took a couple of minutes to patch and seems to work OK (barring a small issue getting the episode numbers).

—— START
I found that by co-opting (and modifying slightly the behaviour of) the --refreshfuture cmdline option, I was able to re-populate the cache with a fair amount of stuff. I have modified the 2.86 git version of the get_iplayer.pl script I have on Windows (precisely, from git branch f109d22).


In the get_links sub, I changed schedule_feeds to:

  my @schedule_feeds = (
   "
http://www.bbc.co.uk/${channel_id
}/this_week.xml",
   "
http://www.bbc.co.uk/${channel_id
}/last_week.xml",
  );


and then reversed the sense of:

    # Don't create this prog instance if the availablity is in the past
# this prevents programmes which never appear in iPlayer from being indexed
    next if Programme::get_time_string( $available ) < $now;


to:


    next if Programme::get_time_string( $available )> $now;


Now when I perform, e.g.:


"%Windir%\system32\cmd.exe" /c get_iplayer --refresh --type radio --refreshfuture

or

"%Windir%\system32\cmd.exe" /c get_iplayer --refresh --type tv --refreshfuture


my radio.cache (or tv.cache) is repopulated with a wealth of metadata.

Subsequently downloading content with this cache (at least I've tried for flashaaclow radio) leaves me with files populated with a (albeit wrong/generic iPlayer) thumbnail and what appears to be at least some of the correct tagging.


The only down-side so far seems to be that some progs are missing from before (e.g. Doctor Who Extra in the tv.cache). Presumably these are non-broadcast-schedule files, e.g. red-button-esque web-only iPlayer features.

——— END

Just add —refresh future to your commands. e.g. get_iplayer —pvr —whitespace —refreshfuture

Once the cache is populated you can see it in the web gui, search, save new pvr (just do not press refresh cache!)

LONGTERM FIX

This is what I would do to fix it.

1) Split the existing schedule logic off to its own method, so that it can be called twice (to get past programs and to get future programs).
2) Remove the broken feed logic
3) Replace it with a call to the schedule logic method. (NB: Doing this pulls this logic out into its own method, so it means that if the schedule xml disappears in the future and we need to do some web scraping, then we just need a new method to call instead) 4) Add the extract for episodenum from <position> in the xml. (Not a biggy, but quick to implement). 5) Add some date logic to get the current date and look back further than the last_week.xml feed (this way we could get the full 30 days).

That is probably it. Then the pvr and search functions should work fine. The web gui will also work.

That is my suggestion to fix it, not too hard, probably a few bugs or issues would need to be flushed out later, but certainly workable.
Please reply if you have some other wizardry in mind.

So any perl gurus out there who want to have a go. If no one else does it I will probably have a look when I get a moment, not for a week or so though I might have to bring out the perl cookbook though. Not great at perl.


On 31/10/2014, at 22:34, Roger Bell_West <[email protected]> wrote:

On Fri, Oct 31, 2014 at 09:08:26AM -0000, Trevor Campbell Davis wrote:
It’s a pain, but I can easily manually source the PIDs of the
programmes that I want on a daily basis.  What I don’t want (or have
time) to do is to manually enter single command line instructions for
each programme when the previous one has finished downloading.  So a
script (resembling a queue) where I can enter multiple PIDs for
automatic sequential download would be really helpful.

At the most basic level, you can just use the shell (this is for
bash):

for P in b00hslb0 b04mb11l b04mb6ck; do get_iplayer --type radio --metadata generic --pid $P --get; done

I have written a program to automate scraping, but I'm working on
getting it into a suitable form for release.

R

_______________________________________________
get_iplayer mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/get_iplayer


_______________________________________________
get_iplayer mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/get_iplayer

_______________________________________________
get_iplayer mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/get_iplayer

Reply via email to