On Mon, Apr 08, 2013 at 01:22:52AM +0100, Mikolaj Kucharski wrote:
> Hi,
> 
> Unbreaks after YouTube changes from last month, which I've missed. Works
> for me. Comparing to 0.41 this version brings:
> 
> - fixes the tool after site changes
> - switch from modinst to modbuild
> - various grammar/typo fixes
> - proxy support
> - new {user} substitution variable
> - new code example
> 
> Changes from 0.41:
> http://cpansearch.perl.org/src/XAICRON/WWW-YouTube-Download-0.47/Changes

Below diff adds real fix for RT 81068 (one item in the playlist).
Reported upstream.


Index: Makefile
===================================================================
RCS file: /cvs/ports/www/p5-WWW-YouTube-Download/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile    11 Mar 2013 11:44:47 -0000      1.8
+++ Makefile    8 Apr 2013 01:08:59 -0000
@@ -3,7 +3,7 @@
 COMMENT =      simple YouTube interface for downloading videos
 
 MODULES =      cpan
-DISTNAME =     WWW-YouTube-Download-0.41
+DISTNAME =     WWW-YouTube-Download-0.47
 CATEGORIES =   www
 
 MAINTAINER =   Mikolaj Kucharski <miko...@kucharski.name>
@@ -12,7 +12,7 @@
 PERMIT_PACKAGE_CDROM = Yes
 
 CPAN_AUTHOR =          XAICRON
-CONFIGURE_STYLE =      modinst
+CONFIGURE_STYLE =      modbuild
 
 MODCPAN_EXAMPLES =     Yes
 MODCPAN_EXAMPLES_DIST =        eg
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/p5-WWW-YouTube-Download/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo    5 Nov 2012 10:59:43 -0000       1.6
+++ distinfo    8 Apr 2013 01:08:59 -0000
@@ -1,2 +1,2 @@
-SHA256 (WWW-YouTube-Download-0.41.tar.gz) = 
cheRCs/ccYhSvjzrrX+CByCyCJ8K7Nyz1TbST7YpeFY=
-SIZE (WWW-YouTube-Download-0.41.tar.gz) = 35480
+SHA256 (WWW-YouTube-Download-0.47.tar.gz) = 
ggyBBFUnCqV3QJ96XqtISjlZUf22PBupQm1BQMwJcZs=
+SIZE (WWW-YouTube-Download-0.47.tar.gz) = 23485
Index: patches/patch-Makefile_PL
===================================================================
RCS file: patches/patch-Makefile_PL
diff -N patches/patch-Makefile_PL
--- patches/patch-Makefile_PL   7 Apr 2012 20:54:07 -0000       1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-$OpenBSD: patch-Makefile_PL,v 1.4 2012/04/07 20:54:07 sthen Exp $
-
-Module::Install::AuthorTests is missing in ports tree,
-but not really essential.
-
-Same for Module::Install::Repository.
-
-
---- Makefile.PL.orig   Tue Jan 17 16:23:57 2012
-+++ Makefile.PL        Sat Apr  7 21:53:04 2012
-@@ -11,10 +11,9 @@ requires 'Term::ANSIColor'; # for youtube-download and
- requires 'XML::TreePP'; # for youtube-playlists
- 
- tests 't/*.t t/*/*.t';
--author_tests 'xt';
- 
- install_script 'bin/youtube-download', 'bin/youtube-playlists';
- 
- test_requires 'Test::More', '0.96';
--auto_set_repository;
-+#auto_set_repository;
- WriteAll;
Index: patches/patch-bin_youtube-playlists
===================================================================
RCS file: patches/patch-bin_youtube-playlists
diff -N patches/patch-bin_youtube-playlists
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-bin_youtube-playlists 8 Apr 2013 01:08:59 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+- fix for playlists with only one item (reported in RT 81068, but not really 
fixed)
+
+--- bin/youtube-playlists.orig Mon Apr  1 18:07:46 2013
++++ bin/youtube-playlists      Mon Apr  8 02:06:29 2013
+@@ -57,7 +57,9 @@ sub find_video_urls {
+     my $urls = [];
+     chatty('Parsing XML ... ');
+     my $tree = $tpp->parse($xml);
+-    for my $entry (@{ $tree->{feed}{entry} || [] }) {
++    my $entries = ref($tree->{feed}{entry}) eq 'ARRAY' ?
++      $tree->{feed}{entry} : [ $tree->{feed}{entry} ];
++    for my $entry (@$entries) {
+         my $uri = URI->new($entry->{'media:group'}{'media:player'}{-url});
+         $uri->query_param_delete('feature');
+         push @$urls, $uri->as_string;
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/p5-WWW-YouTube-Download/pkg/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- pkg/PLIST   24 Jan 2012 00:44:47 -0000      1.2
+++ pkg/PLIST   8 Apr 2013 01:08:59 -0000
@@ -8,4 +8,5 @@
 @man man/man3p/WWW::YouTube::Download.3p
 share/examples/p5-WWW-YouTube-Download/
 share/examples/p5-WWW-YouTube-Download/cb.pl
+share/examples/p5-WWW-YouTube-Download/menu.pl
 share/examples/p5-WWW-YouTube-Download/parallel.pl


-- 
best regards
q#

Reply via email to