update to infradead.org's v2.77, fixes flash streams following CDN changes
This commit is contained in:
parent
62960aaafd
commit
b9c2edde22
@ -1,9 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.40 2010/05/01 21:17:25 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.41 2010/05/26 20:13:06 sthen Exp $
|
||||
|
||||
COMMENT = download BBC iPlayer and ITV programmes
|
||||
|
||||
DISTNAME = get_iplayer-2.72
|
||||
PKGNAME = ${DISTNAME}p0
|
||||
DISTNAME = get_iplayer-2.77
|
||||
CATEGORIES = multimedia
|
||||
|
||||
HOMEPAGE = http://linuxcentre.net/get_iplayer/
|
||||
@ -18,8 +17,7 @@ PERMIT_DISTFILES_FTP = Yes
|
||||
|
||||
MAINTAINER = Stuart Henderson <sthen@openbsd.org>
|
||||
|
||||
MASTER_SITES = http://linuxcentre.net/get_iplayer/packages/ \
|
||||
http://linuxcentre.net/get_iplayer/packages/archive/
|
||||
MASTER_SITES = ftp://ftp.infradead.org/pub/get_iplayer/
|
||||
|
||||
RUN_DEPENDS = ::audio/id3lib \
|
||||
::multimedia/atomicparsley \
|
||||
@ -42,6 +40,5 @@ do-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/get_iplayer ${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/plugins/* \
|
||||
${PREFIX}/share/get_iplayer/plugins
|
||||
${INSTALL_MAN} ${WRKSRC}/get_iplayer.1 ${PREFIX}/man/man1
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (get_iplayer-2.72.tar.gz) = lS52jJEQW41FAtr/EQRznA==
|
||||
RMD160 (get_iplayer-2.72.tar.gz) = /Bg9whqkYoKLr5C9ncnsKoBpdCU=
|
||||
SHA1 (get_iplayer-2.72.tar.gz) = OC7UECUmvpxGMJKVV5eZdSLyuIY=
|
||||
SHA256 (get_iplayer-2.72.tar.gz) = KaOYC4QZlyw2Rt/RsV/JC1E06C+QKY4f31e1VQUEJ5U=
|
||||
SIZE (get_iplayer-2.72.tar.gz) = 202824
|
||||
MD5 (get_iplayer-2.77.tar.gz) = Fu8TvRW0VVKBwNjpO6qfPA==
|
||||
RMD160 (get_iplayer-2.77.tar.gz) = njWG3KaN161ag26hQLL3RNE+Smc=
|
||||
SHA1 (get_iplayer-2.77.tar.gz) = h/eJjppmzPrV/cQBt55ZGijhuXU=
|
||||
SHA256 (get_iplayer-2.77.tar.gz) = vhQKUF9Td47fiVyOz3upW6KVhMYmYePTH+6jij3BAB4=
|
||||
SIZE (get_iplayer-2.77.tar.gz) = 181434
|
||||
|
@ -1,15 +1,7 @@
|
||||
$OpenBSD: patch-get_iplayer,v 1.33 2010/05/01 21:17:25 sthen Exp $
|
||||
|
||||
- use id3tag not id3v2
|
||||
- switch default to rtmpdump
|
||||
- increase max retries for flash modes, increasing the chance of
|
||||
getting full downloads if you're not using SWFVerification
|
||||
(see FILESDIR/options.sample for an example of how to use this).
|
||||
- various fixes/tidyup from upstream 2.76 and github.com/jjl/get_iplayer
|
||||
|
||||
--- get_iplayer.orig Fri Feb 26 11:59:42 2010
|
||||
+++ get_iplayer Sat May 1 22:07:24 2010
|
||||
@@ -330,7 +330,7 @@ mkpath $profile_dir if ! -d $profile_dir;
|
||||
$OpenBSD: patch-get_iplayer,v 1.34 2010/05/26 20:13:06 sthen Exp $
|
||||
--- get_iplayer.orig Wed May 26 14:19:02 2010
|
||||
+++ get_iplayer Wed May 26 21:08:24 2010
|
||||
@@ -327,7 +327,7 @@ mkpath $profile_dir if ! -d $profile_dir;
|
||||
|
||||
|
||||
# get list of additional user plugins and load plugin
|
||||
@ -18,15 +10,7 @@ getting full downloads if you're not using SWFVerification
|
||||
my $plugin_dir_user = "$profile_dir/plugins";
|
||||
for my $plugin_dir ( ( $plugin_dir_user, $plugin_dir_system ) ) {
|
||||
if ( opendir( DIR, $plugin_dir ) ) {
|
||||
@@ -452,6 +452,7 @@ if ( ! keys %plugin_files ) {
|
||||
$opt->{pluginsupdate} = 1;
|
||||
}
|
||||
# Update this script if required
|
||||
+$opt->{packagemanager}='disable';
|
||||
update_script() if $opt->{update} || $opt->{pluginsupdate};
|
||||
|
||||
|
||||
@@ -658,12 +659,12 @@ sub init_search {
|
||||
@@ -645,12 +645,12 @@ sub init_search {
|
||||
delete $binopts->{vlc};
|
||||
push @{ $binopts->{vlc} }, '-vv' if $opt->{debug};
|
||||
|
||||
@ -36,83 +20,12 @@ getting full downloads if you're not using SWFVerification
|
||||
|
||||
$bin->{tee} = 'tee';
|
||||
|
||||
- $bin->{flvstreamer} = $opt->{flvstreamer} || $opt->{rtmpdump} || 'flvstreamer';
|
||||
+ $bin->{flvstreamer} = $opt->{flvstreamer} || $opt->{rtmpdump} || 'rtmpdump';
|
||||
- $bin->{flvstreamer} = $opt->{flvstreamer} || 'flvstreamer';
|
||||
+ $bin->{flvstreamer} = $opt->{flvstreamer} || 'rtmpdump';
|
||||
delete $binopts->{flvstreamer};
|
||||
push @{ $binopts->{flvstreamer} }, ( '--timeout', 10 );
|
||||
push @{ $binopts->{flvstreamer} }, '--quiet' if $opt->{quiet};
|
||||
@@ -1152,18 +1153,24 @@ sub list_progs {
|
||||
$this->generate_filenames( $ua, $this->file_prefix_format() );
|
||||
# info
|
||||
$this->display_metadata( sort keys %{ $this } ) if $opt->{info};
|
||||
- # subs
|
||||
- if ( $opt->{subsonly} ) {
|
||||
- # skip for non-tv
|
||||
- $this->download_subtitles( $ua, "$this->{dir}/$this->{fileprefix}.srt" ) if $this->{type} eq 'tv';
|
||||
+ # subs (only for tv)
|
||||
+ if ( $opt->{subsonly} && $this->{type} eq 'tv') {
|
||||
+ $this->create_dir();
|
||||
+ $this->download_subtitles( $ua, "$this->{dir}/$this->{fileprefix}.srt" );
|
||||
}
|
||||
# metadata
|
||||
- $this->create_metadata_file if $opt->{metadataonly};
|
||||
+ if ( $opt->{metadataonly} ) {
|
||||
+ $this->create_dir();
|
||||
+ $this->create_metadata_file;
|
||||
+ }
|
||||
# thumbnail
|
||||
- $this->download_thumbnail if $opt->{thumbonly} && $this->{thumbnail};
|
||||
+ if ( $opt->{thumbonly} && $this->{thumbnail} ) {
|
||||
+ $this->create_dir();
|
||||
+ $this->download_thumbnail();
|
||||
+ }
|
||||
# streaminfo
|
||||
if ( $opt->{streaminfo} ) {
|
||||
- main::display_stream_info( $this, $this->{verpids}->{$version}, $version );
|
||||
+ main::display_stream_info( $this, $this->{verpids}->{$this->{version}}, $this->{version} );
|
||||
$opt->{quiet} = 0;
|
||||
}
|
||||
# remove offending metadata
|
||||
@@ -3872,6 +3879,16 @@ sub init {
|
||||
}
|
||||
|
||||
|
||||
+# Create dir if it does not exist
|
||||
+sub create_dir {
|
||||
+ my $prog = shift;
|
||||
+ if ( (! -d "$prog->{dir}") && (! $opt->{test}) ) {
|
||||
+ main::logger "INFO: Creating dir '$prog->{dir}'\n" if $opt->{verbose};
|
||||
+ mkpath("$prog->{dir}");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
# Return metadata of the prog
|
||||
sub get_metadata {
|
||||
my $prog = shift;
|
||||
@@ -4182,11 +4199,17 @@ sub mode_ver_download_retry_loop {
|
||||
$hist->add( $prog );
|
||||
$prog->tag_file;
|
||||
}
|
||||
- $prog->download_thumbnail if $opt->{thumb};
|
||||
- $prog->create_metadata_file if $opt->{metadata};
|
||||
- if ( ! $opt->{nowrite} ) {
|
||||
- $prog->run_user_command( $opt->{command} ) if $opt->{command};
|
||||
+ if ( $opt->{thumb} ) {
|
||||
+ $prog->create_dir();
|
||||
+ $prog->download_thumbnail();
|
||||
+ }
|
||||
+ if ( $opt->{metadata} ) {
|
||||
+ $prog->create_dir();
|
||||
+ $prog->create_metadata_file();
|
||||
}
|
||||
+ if ( $opt->{command} && ! $opt->{nowrite} ) {
|
||||
+ $prog->run_user_command( $opt->{command});
|
||||
+ }
|
||||
}
|
||||
$prog->report() if $opt->{pvr};
|
||||
return 0;
|
||||
@@ -4224,7 +4247,7 @@ sub tag_file {
|
||||
@@ -4063,7 +4063,7 @@ sub tag_file {
|
||||
my ( $id3_name, $id3_episode, $id3_desc, $id3_channel ) = ( $prog->{name}, $prog->{episode}, $prog->{desc}, $prog->{channel} );
|
||||
s|"|\\"|g for ($id3_name, $id3_episode, $id3_desc, $id3_channel);
|
||||
# Only tag if the required tool exists
|
||||
@ -121,138 +34,3 @@ getting full downloads if you're not using SWFVerification
|
||||
main::logger "INFO: id3 tagging $prog->{ext} file\n";
|
||||
my @cmd = (
|
||||
$bin->{id3v2},
|
||||
@@ -4592,9 +4615,6 @@ sub generate_filenames {
|
||||
main::logger("INFO: Creating multi-part subdirectory $prog->{dir} for programme\n") if $opt->{verbose};
|
||||
}
|
||||
|
||||
- # Create dir if it does not exist
|
||||
- mkpath("$prog->{dir}") if (! -d "$prog->{dir}") && (! $opt->{test});
|
||||
-
|
||||
main::logger("\rINFO: File name prefix = $prog->{fileprefix} \n");
|
||||
|
||||
# Use a dummy file ext if one isn't set - helps with readability of metadata
|
||||
@@ -4757,11 +4777,13 @@ sub create_symlink {
|
||||
my $symlink = shift;
|
||||
my $target = shift;
|
||||
|
||||
- # remove old symlink
|
||||
- unlink $symlink if -l $symlink;
|
||||
- # Create symlink
|
||||
- symlink $target, $symlink;
|
||||
- main::logger "INFO: Created symlink from '$symlink' -> '$target'\n" if $opt->{verbose};
|
||||
+ if ( ( ! ( $opt->{stdout} && $opt->{nowrite} ) ) && ( ! $opt->{test} ) ) {
|
||||
+ # remove old symlink
|
||||
+ unlink $symlink if -l $symlink;
|
||||
+ # Create symlink
|
||||
+ symlink $target, $symlink;
|
||||
+ main::logger "INFO: Created symlink from '$symlink' -> '$target'\n" if $opt->{verbose};
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
@@ -5615,7 +5637,6 @@ sub get_rdf_data {
|
||||
main::logger "WARNING: rdf URL contained no data\n";
|
||||
return '';
|
||||
}
|
||||
- decode_entities( $entry );
|
||||
# Flatten
|
||||
$entry =~ s|[\n\r]| |g;
|
||||
my $simple = new XML::Simple();
|
||||
@@ -6789,14 +6810,19 @@ sub download {
|
||||
# Override flash ext based on raw
|
||||
$prog->{ext} = 'flv' if $opt->{raw} && $mode =~ /^flash/;
|
||||
|
||||
-
|
||||
# Determine the correct filenames for this recording
|
||||
if ( $prog->generate_filenames( $ua, $prog->file_prefix_format() ) ) {
|
||||
- # Create symlink if required
|
||||
- $prog->create_symlink( $prog->{symlink}, $prog->{filename}) if $opt->{symlink};
|
||||
return 'skip';
|
||||
}
|
||||
-
|
||||
+
|
||||
+ # Create symlink if required
|
||||
+ $prog->create_symlink( $prog->{symlink}, $prog->{filename}) if $opt->{symlink};
|
||||
+
|
||||
+ # Create dir for prog if not streaming-only
|
||||
+ if ( ( ! ( $opt->{stdout} && $opt->{nowrite} ) ) && ( ! $opt->{test} ) ) {
|
||||
+ $prog->create_dir();
|
||||
+ }
|
||||
+
|
||||
# Skip from here if we are only testing recordings
|
||||
return 'skip' if $opt->{test};
|
||||
|
||||
@@ -7703,7 +7729,7 @@ sub get {
|
||||
main::logger "INFO: Stage 3 URL = $url_2\n" if $opt->{verbose};
|
||||
|
||||
# Override the $rearrange value is --raw option is specified
|
||||
- $rearrange = 1 if $prog->{type} eq 'tv' && not $opt->{raw};
|
||||
+ #$rearrange = 1 if $prog->{type} eq 'tv' && not $opt->{raw};
|
||||
main::logger "DEBUG: Rearrang mov file mode = $rearrange (type: $prog->{type}, raw: $opt->{raw})\n" if $opt->{debug};
|
||||
|
||||
# Use url prepend if required
|
||||
@@ -8131,26 +8157,17 @@ sub get {
|
||||
main::logger "INFO: $bin->{flvstreamer} version $rtmpver\n" if $opt->{verbose};
|
||||
main::logger "INFO: RTMP_URL: $url_2, tcUrl: $tcurl, application: $application, authString: $authstring, swfUrl: $swfurl, file: $prog->{filepart}, file_done: $prog->{filename}\n" if $opt->{verbose};
|
||||
|
||||
- # Save the effort and don't support < v1.5
|
||||
- if ( $rtmpver < 1.5 ) {
|
||||
- main::logger "WARNING: rtmpdump >= 1.5 or flvstreamer is required - please upgrade\n";
|
||||
+ # Save the effort and don't support < v1.8
|
||||
+ if ( $rtmpver < 1.8 ) {
|
||||
+ main::logger "WARNING: rtmpdump or flvstreamer >= 1.8 is required - please upgrade\n";
|
||||
return 'next';
|
||||
}
|
||||
|
||||
# Add --live option if required
|
||||
- if ( $streamdata{live} ) {
|
||||
- if ( $rtmpver < 1.8 ) {
|
||||
- main::logger "WARNING: Please use flvstreamer v1.8 or later for more reliable live streaming\n";
|
||||
- }
|
||||
- push @cmdopts, '--live';
|
||||
- }
|
||||
+ push @cmdopts, '--live' if $streamdata{live};
|
||||
|
||||
# Add start stop options if defined
|
||||
if ( $opt->{start} || $opt->{stop} ) {
|
||||
- if ( $rtmpver < 1.8 ) {
|
||||
- main::logger "ERROR: Please use flvstreamer v1.8c or later for start/stop features\n";
|
||||
- exit 4;
|
||||
- }
|
||||
push @cmdopts, ( '--start', $opt->{start} ) if $opt->{start};
|
||||
push @cmdopts, ( '--stop', $opt->{stop} ) if $opt->{stop};
|
||||
}
|
||||
@@ -8166,13 +8183,7 @@ sub get {
|
||||
main::logger "ERROR: Cannot stream RTMP to STDOUT and file simultaneously\n";
|
||||
exit 4;
|
||||
}
|
||||
- if ( $opt->{stdout} && $opt->{nowrite} ) {
|
||||
- if ( $rtmpver < 1.7) {
|
||||
- push @cmdopts, ( '-o', '-' );
|
||||
- }
|
||||
- } else {
|
||||
- push @cmdopts, ( '--resume', '-o', $file_tmp );
|
||||
- }
|
||||
+ push @cmdopts, ( '--resume', '-o', $file_tmp ) if ! ( $opt->{stdout} && $opt->{nowrite} );
|
||||
push @cmdopts, @{ $binopts->{flvstreamer} } if $binopts->{flvstreamer};
|
||||
|
||||
my $return;
|
||||
@@ -8993,16 +9004,8 @@ sub get {
|
||||
|
||||
# Recording - disabled
|
||||
} else {
|
||||
- # Commented out cos this is stream-only - don't want anything in history as a result
|
||||
- #main::logger "INFO: Copying $url to $prog->{filepart}\n" if $opt->{verbose};
|
||||
- #if ( ! copy( $url, $prog->{filepart} ) ) {
|
||||
- # main::logger "\rERROR: Recording failed\n";
|
||||
- main::logger "\rERROR: Recording failed - this is a stream-only programme\n";
|
||||
- return 'next';
|
||||
- #}
|
||||
- #move $prog->{filepart}, $prog->{filename} if $prog->{filepart} ne $prog->{filename};
|
||||
- ## symlink file
|
||||
- #$prog->create_symlink( $prog->{symlink}, $prog->{filename} ) if $opt->{symlink};
|
||||
+ main::logger "\rERROR: Recording failed - this is a stream-only programme\n";
|
||||
+ return 'next';
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1,6 +1,5 @@
|
||||
@comment $OpenBSD: PLIST,v 1.4 2009/09/21 22:30:58 sthen Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.5 2010/05/26 20:13:06 sthen Exp $
|
||||
bin/get_iplayer
|
||||
@man man/man1/get_iplayer.1
|
||||
share/get_iplayer/
|
||||
share/get_iplayer/options.sample
|
||||
@sample ${SYSCONFDIR}/get_iplayer/
|
||||
|
Loading…
Reference in New Issue
Block a user