pull up get_iplayer changes from git head

This commit is contained in:
sthen 2014-09-03 10:16:43 +00:00
parent 6ad5a1ce4b
commit 57181f3508
2 changed files with 314 additions and 9 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.75 2014/08/10 09:58:06 espie Exp $
# $OpenBSD: Makefile,v 1.76 2014/09/03 10:16:43 sthen Exp $
COMMENT= download/stream programmes from BBC iPlayer
DISTNAME= get_iplayer-2.86
REVISION= 0
CATEGORIES= multimedia
# http://git.infradead.org/get_iplayer.git

View File

@ -1,7 +1,16 @@
$OpenBSD: patch-get_iplayer,v 1.61 2014/04/06 17:03:03 sthen Exp $
--- get_iplayer.orig Sat Apr 5 20:31:29 2014
+++ get_iplayer Sun Apr 6 17:36:44 2014
@@ -321,6 +321,7 @@ my @argv_save = @ARGV;
$OpenBSD: patch-get_iplayer,v 1.62 2014/09/03 10:16:43 sthen Exp $
--- get_iplayer.orig Wed Sep 3 11:13:16 2014
+++ get_iplayer Wed Sep 3 11:13:13 2014
@@ -71,8 +71,6 @@ use strict;
#use warnings;
use Time::Local;
use URI;
-use open qw(:utf8);
-
my %SIGORIG;
# Save default SIG actions
$SIGORIG{$_} = $SIG{$_} for keys %SIG;
@@ -321,6 +319,7 @@ my @argv_save = @ARGV;
$opt_pre->parse( 1 );
@ARGV = @argv_save;
# Copy a few options over to opt so that logger works
@ -9,7 +18,7 @@ $OpenBSD: patch-get_iplayer,v 1.61 2014/04/06 17:03:03 sthen Exp $
$opt->{debug} = $opt->{verbose} = 1 if $opt_pre->{debug};
$opt->{verbose} = 1 if $opt_pre->{verbose};
$opt->{quiet} = 1 if $opt_pre->{quiet};
@@ -368,7 +369,7 @@ my $plugin_dir_system;
@@ -368,7 +367,7 @@ my $plugin_dir_system;
if ( defined $ENV{ALLUSERSPROFILE} ) {
$plugin_dir_system = $ENV{ALLUSERSPROFILE}.'/get_iplayer/plugins';
} else {
@ -18,7 +27,7 @@ $OpenBSD: patch-get_iplayer,v 1.61 2014/04/06 17:03:03 sthen Exp $
}
my $plugin_dir_user = "$profile_dir/plugins";
for my $plugin_dir ( ( $plugin_dir_user, $plugin_dir_system ) ) {
@@ -788,7 +789,7 @@ sub init_search {
@@ -788,7 +787,7 @@ sub init_search {
delete $binopts->{vlc};
push @{ $binopts->{vlc} }, '-vv' if $opt->{debug};
@ -27,7 +36,16 @@ $OpenBSD: patch-get_iplayer,v 1.61 2014/04/06 17:03:03 sthen Exp $
$bin->{atomicparsley} = $opt->{atomicparsley} || 'AtomicParsley';
$bin->{tee} = 'tee';
@@ -2597,7 +2598,7 @@ sub request_url_retry {
@@ -2376,7 +2375,7 @@ sub create_xml {
'J-L' => '[jkl]',
'M-N' => '[mn]',
'O-P' => '[op]',
- 'Q-R' => '[qt]',
+ 'Q-R' => '[qr]',
'S-T' => '[st]',
'U-V' => '[uv]',
'W-Z' => '[wxyz]',
@@ -2597,7 +2596,7 @@ sub request_url_retry {
}
# Malformed URL check
@ -36,7 +54,293 @@ $OpenBSD: patch-get_iplayer,v 1.61 2014/04/06 17:03:03 sthen Exp $
logger "ERROR: Malformed URL: '$url'\n";
return '';
}
@@ -9939,7 +9940,7 @@ sub tag_file_id3 {
@@ -2622,10 +2621,9 @@ sub request_url_retry {
# Only return decoded content if gzip is used - otherwise this severely slows down stco scanning! Perl bug?
main::logger "DEBUG: ".($res->header('Content-Encoding') || 'No')." Encoding used on $url\n" if $opt->{debug};
- # this appears to be obsolete
- # return $res->decoded_content if defined $res->header('Content-Encoding') && $res->header('Content-Encoding') eq 'gzip';
- # return $res->content;
- return $res->decoded_content;
+ return $res->decoded_content if defined $res->header('Content-Encoding') && $res->header('Content-Encoding') eq 'gzip';
+
+ return $res->content;
}
@@ -6082,7 +6080,7 @@ sub get_stream_data_cdn {
# Common attributes
# swfurl = Default iPlayer swf version
my $conn = {
- swfurl => "http://www.bbc.co.uk/emp/releases/iplayer/revisions/617463_618125_4/617463_618125_4_emp.swf",
+ swfurl => "http://emp.bbci.co.uk/emp/releases/smp-flash/revisions/1.9.23/1.9.23_smp.swf?1.9.23",
ext => $ext,
streamer => $streamer,
bitrate => $mattribs->{bitrate},
@@ -6598,34 +6596,38 @@ sub channels_schedule {
return {
'bbcalba/programmes/schedules' => 'BBC Alba',
'bbcfour/programmes/schedules' => 'BBC Four',
- 'bbcnews/programmes/schedules' => 'BBC News 24',
+ 'bbcnews/programmes/schedules' => 'BBC News',
'bbcone/programmes/schedules/cambridge' => 'BBC One Cambridgeshire',
'bbcone/programmes/schedules/channel_islands' => 'BBC One Channel Islands',
'bbcone/programmes/schedules/east' => 'BBC One East',
'bbcone/programmes/schedules/east_midlands' => 'BBC One East Midlands',
- 'bbcone/programmes/schedules/hd' => 'BBC One HD',
+ 'bbcone/programmes/schedules/hd' => 'BBC One',
'bbcone/programmes/schedules/london' => 'BBC One London',
'bbcone/programmes/schedules/north_east' => 'BBC One North East & Cumbria',
'bbcone/programmes/schedules/north_west' => 'BBC One North West',
'bbcone/programmes/schedules/ni' => 'BBC One Northern Ireland',
+ 'bbcone/programmes/schedules/ni_hd' => 'BBC One Northern Ireland',
'bbcone/programmes/schedules/oxford' => 'BBC One Oxfordshire',
'bbcone/programmes/schedules/scotland' => 'BBC One Scotland',
+ 'bbcone/programmes/schedules/scotland_hd' => 'BBC One Scotland',
'bbcone/programmes/schedules/south' => 'BBC One South',
'bbcone/programmes/schedules/south_east' => 'BBC One South East',
'bbcone/programmes/schedules/south_west' => 'BBC One South West',
'bbcone/programmes/schedules/wales' => 'BBC One Wales',
+ 'bbcone/programmes/schedules/wales_hd' => 'BBC One Wales',
'bbcone/programmes/schedules/west' => 'BBC One West',
'bbcone/programmes/schedules/west_midlands' => 'BBC One West Midlands',
'bbcone/programmes/schedules/east_yorkshire' => 'BBC One Yorks & Lincs',
'bbcone/programmes/schedules/yorkshire' => 'BBC One Yorkshire',
- 'parliament/programmes/schedules' => 'BBC Parliament',
'bbcthree/programmes/schedules' => 'BBC Three',
'bbctwo/programmes/schedules/england' => 'BBC Two England',
+ 'bbctwo/programmes/schedules/hd' => 'BBC Two',
'bbctwo/programmes/schedules/ni' => 'BBC Two Northern Ireland',
'bbctwo/programmes/schedules/scotland' => 'BBC Two Scotland',
'bbctwo/programmes/schedules/wales' => 'BBC Two Wales',
'cbbc/programmes/schedules' => 'CBBC',
'cbeebies/programmes/schedules' => 'CBeebies',
+ 'parliament/programmes/schedules' => 'BBC Parliament',
};
}
@@ -7446,14 +7448,14 @@ sub index_min { return 10001 }
sub index_max { return 19999 };
sub channels {
return {
- 'bbc_1xtra' => 'BBC 1Xtra',
+ 'bbc_1xtra' => 'BBC Radio 1Xtra',
'bbc_radio_one' => 'BBC Radio 1',
'bbc_radio_two' => 'BBC Radio 2',
'bbc_radio_three' => 'BBC Radio 3',
'bbc_radio_four' => 'BBC Radio 4',
'bbc_radio_four_extra' => 'BBC Radio 4 Extra',
'bbc_radio_five_live' => 'BBC Radio 5 live',
- 'bbc_radio_five_live_sports_extra' => 'BBC 5 live Sports Extra',
+ 'bbc_radio_five_live_sports_extra' => 'BBC 5 live sports extra',
'bbc_6music' => 'BBC 6 Music',
'bbc_7' => 'BBC 7',
'bbc_asian_network' => 'BBC Asian Network',
@@ -7464,114 +7466,121 @@ sub channels {
'bbc_radio_wales' => 'BBC Radio Wales',
'bbc_radio_cymru' => 'BBC Radio Cymru',
'bbc_world_service' => 'BBC World Service',
- 'bbc_radio_cumbria' => 'BBC Cumbria',
+ 'bbc_radio_cumbria' => 'BBC Radio Cumbria',
'bbc_radio_newcastle' => 'BBC Newcastle',
'bbc_tees' => 'BBC Tees',
- 'bbc_radio_lancashire' => 'BBC Lancashire',
- 'bbc_radio_merseyside' => 'BBC Merseyside',
- 'bbc_radio_manchester' => 'BBC Manchester',
- 'bbc_radio_leeds' => 'BBC Leeds',
- 'bbc_radio_sheffield' => 'BBC Sheffield',
- 'bbc_radio_york' => 'BBC York',
- 'bbc_radio_humberside' => 'BBC Humberside',
- 'bbc_radio_lincolnshire' => 'BBC Lincolnshire',
- 'bbc_radio_nottingham' => 'BBC Nottingham',
- 'bbc_radio_leicester' => 'BBC Leicester',
- 'bbc_radio_derby' => 'BBC Derby',
- 'bbc_radio_stoke' => 'BBC Stoke',
- 'bbc_radio_shropshire' => 'BBC Shropshire',
- 'bbc_wm' => 'BBC WM',
+ 'bbc_radio_lancashire' => 'BBC Radio Lancashire',
+ 'bbc_radio_merseyside' => 'BBC Radio Merseyside',
+ 'bbc_radio_manchester' => 'BBC Radio Manchester',
+ 'bbc_radio_leeds' => 'BBC Radio Leeds',
+ 'bbc_radio_sheffield' => 'BBC Radio Sheffield',
+ 'bbc_radio_york' => 'BBC Radio York',
+ 'bbc_radio_humberside' => 'BBC Radio Humberside',
+ 'bbc_radio_lincolnshire' => 'BBC Radio Lincolnshire',
+ 'bbc_radio_nottingham' => 'BBC Radio Nottingham',
+ 'bbc_radio_leicester' => 'BBC Radio Leicester',
+ 'bbc_radio_derby' => 'BBC Radio Derby',
+ 'bbc_radio_stoke' => 'BBC Radio Stoke',
+ 'bbc_radio_shropshire' => 'BBC Radio Shropshire',
+ 'bbc_wm' => 'BBC WM 95.6',
'bbc_radio_coventry_warwickshire' => 'BBC Coventry & Warwickshire',
'bbc_radio_hereford_worcester' => 'BBC Hereford & Worcester',
- 'bbc_radio_northampton' => 'BBC Northampton',
- 'bbc_three_counties_radio' => 'BBC Three Counties',
- 'bbc_radio_cambridge' => 'BBC Cambridgeshire',
- 'bbc_radio_norfolk' => 'BBC Norfolk',
- 'bbc_radio_suffolk' => 'BBC Suffolk',
+ 'bbc_radio_northampton' => 'BBC Radio Northampton',
+ 'bbc_three_counties_radio' => 'BBC Three Counties Radio',
+ 'bbc_radio_cambridge' => 'BBC Radio Cambridgeshire',
+ 'bbc_radio_norfolk' => 'BBC Radio Norfolk',
+ 'bbc_radio_suffolk' => 'BBC Radio Suffolk',
'bbc_radio_essex' => 'BBC Essex',
- 'bbc_london' => 'BBC London',
- 'bbc_radio_kent' => 'BBC Kent',
+ 'bbc_london' => 'BBC London 94.9',
+ 'bbc_radio_kent' => 'BBC Radio Kent',
'bbc_radio_surrey' => 'BBC Surrey',
'bbc_radio_sussex' => 'BBC Sussex',
- 'bbc_radio_oxford' => 'BBC Oxford',
- 'bbc_radio_berkshire' => 'BBC Berkshire',
- 'bbc_radio_solent' => 'BBC Solent',
- 'bbc_radio_gloucestershire' => 'BBC Gloucestershire',
+ 'bbc_radio_oxford' => 'BBC Radio Oxford',
+ 'bbc_radio_berkshire' => 'BBC Radio Berkshire',
+ 'bbc_radio_solent' => 'BBC Radio Solent',
+ 'bbc_radio_gloucestershire' => 'BBC Radio Gloucestershire',
'bbc_radio_wiltshire' => 'BBC Wiltshire',
- 'bbc_radio_bristol' => 'BBC Bristol',
+ 'bbc_radio_bristol' => 'BBC Radio Bristol',
'bbc_radio_somerset_sound' => 'BBC Somerset',
- 'bbc_radio_devon' => 'BBC Devon',
- 'bbc_radio_cornwall' => 'BBC Cornwall',
- 'bbc_radio_guernsey' => 'BBC Guernsey',
- 'bbc_radio_jersey' => 'BBC Jersey',
+ 'bbc_radio_devon' => 'BBC Radio Devon',
+ 'bbc_radio_cornwall' => 'BBC Radio Cornwall',
+ 'bbc_radio_guernsey' => 'BBC Radio Guernsey',
+ 'bbc_radio_jersey' => 'BBC Radio Jersey',
'popular/radio' => 'Popular',
'highlights/radio' => 'Highlights',
};
}
-# channel ids be found on http://www.bbc.co.uk/bbcone/programmes/schedules/today
+# channel ids be found on http://www.bbc.co.uk/radio/stations
sub channels_schedule {
return {
- '1xtra/programmes/schedules' => 'BBC 1Xtra',
- 'radio1/programmes/schedules/england' => 'BBC Radio 1 England',
+ # national stations
+ 'radio1/programmes/schedules/england' => 'BBC Radio 1',
+ '1xtra/programmes/schedules' => 'BBC Radio 1Xtra',
'radio2/programmes/schedules' => 'BBC Radio 2',
'radio3/programmes/schedules' => 'BBC Radio 3',
- 'radio4/programmes/schedules/fm' => 'BBC Radio 4 FM',
- 'radio4/programmes/schedules/lw' => 'BBC Radio 4 LW',
+ 'radio4/programmes/schedules/fm' => 'BBC Radio 4',
+ 'radio4/programmes/schedules/lw' => 'BBC Radio 4',
'radio4extra/programmes/schedules' => 'BBC Radio 4 Extra',
'5live/programmes/schedules' => 'BBC Radio 5 live',
- '5livesportsextra/programmes/schedules' => 'BBC 5 live Sports Extra',
+ '5livesportsextra/programmes/schedules' => 'BBC 5 live sports extra',
'6music/programmes/schedules' => 'BBC 6 Music',
'asiannetwork/programmes/schedules' => 'BBC Asian Network',
- 'radiofoyle/programmes/schedules' => 'BBC Radio Foyle',
- 'radioscotland/programmes/schedules/fm' => 'BBC Radio Scotland', # fm,mw,orkney,shetland,highlandsandislands
- 'radionangaidheal/programmes/schedules' => 'BBC Radio Nan Gaidheal',
- 'radioulster/programmes/schedules' => 'BBC Radio Ulster',
- 'radiowales/programmes/schedules/fm' => 'BBC Radio Wales FM',
- 'radiowales/programmes/schedules/mw' => 'BBC Radio Wales MW',
- 'radiocymru/programmes/schedules' => 'BBC Radio Cymru',
'worldserviceradio/programmes/schedules' => 'BBC World Service',
- 'radiocumbria/programmes/schedules' => 'BBC Cumbria',
- 'bbcnewcastle/programmes/schedules' => 'BBC Newcastle',
- 'bbctees/programmes/schedules' => 'BBC Tees',
- 'radiolancashire/programmes/schedules' => 'BBC Lancashire',
- 'radiomerseyside/programmes/schedules' => 'BBC Merseyside',
- 'radiomanchester/programmes/schedules' => 'BBC Manchester',
- 'radioleeds/programmes/schedules' => 'BBC Leeds',
- 'radiosheffield/programmes/schedules' => 'BBC Sheffield',
- 'radioyork/programmes/schedules' => 'BBC York',
- 'radiohumberside/programmes/schedules' => 'BBC Humberside',
- 'bbclincolnshire/programmes/schedules' => 'BBC Lincolnshire',
- 'radionottingham/programmes/schedules' => 'BBC Nottingham',
- 'radioleicester/programmes/schedules' => 'BBC Leicester',
- 'radioderby/programmes/schedules' => 'BBC Derby',
- 'radiostoke/programmes/schedules' => 'BBC Stoke',
- 'radioshropshire/programmes/schedules' => 'BBC Shropshire',
- 'wm/programmes/schedules' => 'BBC WM',
- 'bbccoventryandwarwickshire/programmes/schedules' => 'BBC Coventry & Warwickshire',
- 'bbcherefordandworcester/programmes/schedules'=> 'BBC Hereford & Worcester',
- 'radionorthampton/programmes/schedules' => 'BBC Northampton',
- 'threecountiesradio/programmes/schedules' => 'BBC Three Counties',
- 'radiocambridgeshire/programmes/schedules' => 'BBC Cambridgeshire',
- 'radionorfolk/programmes/schedules' => 'BBC Norfolk',
- 'radiosuffolk/programmes/schedules' => 'BBC Suffolk',
- 'bbcessex/programmes/schedules' => 'BBC Essex',
- 'bbclondon/programmes/schedules' => 'BBC London',
- 'radiokent/programmes/schedules' => 'BBC Kent',
+ # nations
+ 'radioscotland/programmes/schedules/fm' => 'BBC Radio Scotland',
+ 'radioscotland/programmes/schedules/orkney' => 'BBC Radio Scotland',
+ 'radioscotland/programmes/schedules/shetland' => 'BBC Radio Scotland',
+ 'radioscotland/programmes/schedules/highlandsandislands' => 'BBC Radio Scotland',
+ 'radioscotland/programmes/schedules/mw' => 'BBC Radio Scotland',
+ 'radionangaidheal/programmes/schedules' => 'BBC Radio Nan Gaidheal',
+ 'radioulster/programmes/schedules' => 'BBC Radio Ulster',
+ 'radiofoyle/programmes/schedules' => 'BBC Radio Foyle',
+ 'radiowales/programmes/schedules/fm' => 'BBC Radio Wales',
+ 'radiowales/programmes/schedules/mw' => 'BBC Radio Wales',
+ 'radiocymru/programmes/schedules' => 'BBC Radio Cymru',
+ # local
+ 'radioberkshire/programmes/schedules' => 'BBC Radio Berkshire',
+ 'radiobristol/programmes/schedules' => 'BBC Radio Bristol',
+ 'radiocambridgeshire/programmes/schedules' => 'BBC Radio Cambridgeshire',
+ 'radiocornwall/programmes/schedules' => 'BBC Radio Cornwall',
+ 'bbccoventryandwarwickshire/programmes/schedules' => 'BBC Coventry & Warwickshire',
+ 'radiocumbria/programmes/schedules' => 'BBC Radio Cumbria',
+ 'radioderby/programmes/schedules' => 'BBC Radio Derby',
+ 'radiodevon/programmes/schedules' => 'BBC Radio Devon',
+ 'bbcessex/programmes/schedules' => 'BBC Essex',
+ 'radiogloucestershire/programmes/schedules' => 'BBC Radio Gloucestershire',
+ 'radioguernsey/programmes/schedules' => 'BBC Radio Guernsey',
+ 'bbcherefordandworcester/programmes/schedules' => 'BBC Hereford & Worcester',
+ 'radiohumberside/programmes/schedules' => 'BBC Radio Humberside',
+ 'radiojersey/programmes/schedules' => 'BBC Radio Jersey',
+ 'radiokent/programmes/schedules' => 'BBC Radio Kent',
+ 'radiolancashire/programmes/schedules' => 'BBC Radio Lancashire',
+ 'radioleeds/programmes/schedules' => 'BBC Radio Leeds',
+ 'radioleicester/programmes/schedules' => 'BBC Radio Leicester',
+ 'radiolincolnshire/programmes/schedules' => 'BBC Radio Lincolnshire',
+ 'bbclondon/programmes/schedules' => 'BBC London 94.9',
+ 'radiomanchester/programmes/schedules' => 'BBC Radio Manchester',
+ 'radiomerseyside/programmes/schedules' => 'BBC Radio Merseyside',
+ 'bbcnewcastle/programmes/schedules' => 'BBC Newcastle',
+ 'radionorfolk/programmes/schedules' => 'BBC Radio Norfolk',
+ 'radionorthampton/programmes/schedules' => 'BBC Radio Northampton',
+ 'radionottingham/programmes/schedules' => 'BBC Radio Nottingham',
+ 'radiooxford/programmes/schedules' => 'BBC Radio Oxford',
+ 'radiosheffield/programmes/schedules' => 'BBC Radio Sheffield',
+ 'radioshropshire/programmes/schedules' => 'BBC Radio Shropshire',
+ 'radiosolent/programmes/schedules' => 'BBC Radio Solent',
+ 'bbcsomerset/programmes/schedules' => 'BBC Somerset',
+ 'radiostoke/programmes/schedules' => 'BBC Radio Stoke',
+ 'radiosuffolk/programmes/schedules' => 'BBC Radio Suffolk',
'bbcsurrey/programmes/schedules' => 'BBC Surrey',
'bbcsussex/programmes/schedules' => 'BBC Sussex',
- 'bbcoxford/programmes/schedules' => 'BBC Oxford',
- 'radioberkshire/programmes/schedules' => 'BBC Berkshire',
- 'radiosolent/programmes/schedules' => 'BBC Solent',
- 'radiogloucestershire/programmes/schedules' => 'BBC Gloucestershire',
- 'bbcwiltshire/programmes/schedules' => 'BBC Wiltshire',
- 'radiobristol/programmes/schedules' => 'BBC Bristol',
- 'bbcsomerset/programmes/schedules' => 'BBC Somerset',
- 'radiodevon/programmes/schedules' => 'BBC Devon',
- 'radiocornwall/programmes/schedules' => 'BBC Cornwall',
- 'bbcguernsey/programmes/schedules' => 'BBC Guernsey',
- 'radiojersey/programmes/schedules' => 'BBC Jersey',
+ 'bbctees/programmes/schedules' => 'BBC Tees',
+ 'threecountiesradio/programmes/schedules' => 'BBC Three Counties Radio',
+ 'bbcwiltshire/programmes/schedules' => 'BBC Wiltshire',
+ 'wm/programmes/schedules' => 'BBC WM 95.6',
+ 'radioyork/programmes/schedules' => 'BBC Radio York',
};
}
@@ -9939,7 +9948,7 @@ sub tag_file_id3 {
# add basic ID3 tag with id3v2
sub tag_file_id3_basic {
my ($self, $meta, $tags) = @_;