[PATCH] Hack to enable finding programmes through programme schedules

Jon Davies jon at hedgerows.org.uk
Sat Nov 1 08:14:59 PDT 2014


below is a hack that uses last week's schedules (and stuff before
today in this week's schedules) to enable some degree of searching for
tv programmes.  Dinkypumpkin's proposed updates will almost certainly
provide a better solution, but this seems to be making the pvr work
again for me.  YMMV

for Ubuntu users I'm in the process of rolling this into my ppa at
get-iplayer-testing and it should pop out of there in the next couple
of hours.  To use the -testing ppa follow the instructions at
https://github.com/dinkypumpkin/get_iplayer/wiki/ubuntu but substitute
"jon-hedgerows/get-iplayer" for "jon-hedgerows/get-iplayer-testing".

You can download a patched copy of the get_iplayer script here:
http://packages.hedgerows.org.uk/gip/

Jon

diff --git a/get_iplayer b/get_iplayer
index bc2e569..d835b82 100755
--- a/get_iplayer
+++ b/get_iplayer
@@ -7414,13 +7414,15 @@ sub get_links {
        # Get future schedules if required
        # http://www.bbc.co.uk/cbbc/programmes/schedules/this_week.xml
        # http://www.bbc.co.uk/cbbc/programmes/schedules/next_week.xml
-       if ( $opt->{refreshfuture} ) {
+       { # hack: always use schedules as feeds no longer work
                # Hack to get correct 'channels' method because this
methods is being shared with Programme::radio
                my %channels = %{
main::progclass($prog_type)->channels_filtered(
main::progclass($prog_type)->channels_schedule() ) };
                # Only get schedules for real channels
                @channel_list = keys %channels;
                for my $channel_id ( @channel_list ) {
                        my @schedule_feeds = (
+                               # last_week finds some old programmes
through schedules instead of feeds
+
"http://www.bbc.co.uk/${channel_id}/last_week.xml",

"http://www.bbc.co.uk/${channel_id}/this_week.xml",

"http://www.bbc.co.uk/${channel_id}/next_week.xml",
                        );
@@ -7569,7 +7571,8 @@ sub get_links {

                                        # 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;
+                                       # don't skip old programmes,
feeds don't work
+                                       ###next if
Programme::get_time_string( $available ) < $now;

                                        # build data structure
                                        $prog->{$pid} =
main::progclass($prog_type)->new(



More information about the get_iplayer mailing list