Hi Release Team Now final fix was released by upstream. I have prepared 2.2.13-4 containing the attached changes in respect to 2.2.13-3 currently in squeeze. I would like to upload it to unstable. It fixes #606540, by changes done in youtube.com again. Thanks for your work towards releasing Squeeze! Bests Salvatore
diff -Nru clive-2.2.13/debian/changelog clive-2.2.13/debian/changelog --- clive-2.2.13/debian/changelog 2010-09-04 15:12:15.000000000 +0200 +++ clive-2.2.13/debian/changelog 2010-12-12 10:23:04.000000000 +0100 @@ -1,3 +1,11 @@ +clive (2.2.13-4) unstable; urgency=low + + * Change my email address. + * Handle changes in youtube.com (Closes: #606540) + + new patch: fix-606540-youtube.patch + + -- Salvatore Bonaccorso <carnil@debian.org> Sun, 12 Dec 2010 10:06:08 +0100 + clive (2.2.13-3) unstable; urgency=low * Handle changed URLs on vimeo.com. (Closes: #595486) diff -Nru clive-2.2.13/debian/control clive-2.2.13/debian/control --- clive-2.2.13/debian/control 2010-09-04 15:12:15.000000000 +0200 +++ clive-2.2.13/debian/control 2010-12-12 10:23:04.000000000 +0100 @@ -4,7 +4,7 @@ Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org> Uploaders: Damyan Ivanov <dmn@debian.org>, Ryan Niebur <ryanryan52@gmail.com>, Ansgar Burchardt <ansgar@43-1.org>, - Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com> + Salvatore Bonaccorso <carnil@debian.org> Build-Depends: debhelper (>= 7) Build-Depends-Indep: perl, libclass-singleton-perl (>= 1.4), diff -Nru clive-2.2.13/debian/patches/fix-606540-youtube.patch clive-2.2.13/debian/patches/fix-606540-youtube.patch --- clive-2.2.13/debian/patches/fix-606540-youtube.patch 1970-01-01 01:00:00.000000000 +0100 +++ clive-2.2.13/debian/patches/fix-606540-youtube.patch 2010-12-12 10:23:04.000000000 +0100 @@ -0,0 +1,170 @@ +Description: Fix broken clive due to youtube changes. +Origin: vendor +Bug: http://sourceforge.net/apps/trac/clive/ticket/1 +Bug-Debian: http://bugs.debian.org/606540 +Forwarded: not-needed +Author: Salvatore Bonaccorso <carnil@debian.org> +Reviewed-by: Salvatore Bonaccorso <carnil@debian.org> +Last-Update: 2010-12-12 + +--- a/lib/clive/Host/Youtube.pm ++++ b/lib/clive/Host/Youtube.pm +@@ -2,7 +2,7 @@ + ########################################################################### + # clive, command line video extraction utility. + # +-# Copyright 2009 Toni Gundogdu. ++# Copyright 2009,2010 Toni Gundogdu. + # + # This file is part of clive. + # +@@ -24,74 +24,106 @@ + use warnings; + use strict; + +-# fmt22 = HD [1280x720] +-# fmt35 = HQ [640x380] +-# fmt17 = 3gp [176x144] +-# fmt18 = mp4 [480x360] +-# fmt34 = flv [320x180] (quality reportedly varies) +- +-# If --format is unused, clive defaults to whatever youtube +-# defaults to: we do not append the "&fmt=" to the video link. +- +-sub new { +- return bless( {}, shift ); +-} ++sub new { return bless ({}, shift); } + + sub parsePage { +- my ( $self, $content, $props ) = @_; ++ my ($self, $content, $props) = @_; + +- $$props->video_host("youtube"); ++ $$props->video_host ("youtube"); + + my %re = ( + id => qr|&video_id=(.*?)&|, +- t => qr|&t=(.*?)&|, ++ fmt_url_map => qr|fmt_url_map=(.*?)&|, + ); + + my $tmp; +- if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) { ++ if (clive::Util::matchRegExps (\%re, \$tmp, $content) == 0) { + +- require URI::Escape; ++ my $best; ++ my %h; + +- $tmp->{t} = URI::Escape::uri_unescape($tmp->{t}); ++ require URI::Escape; + +- my $xurl +- = "http://youtube.com/get_video?video_id=$tmp->{id}&t=$tmp->{t}"; ++ foreach (split /,/, URI::Escape::uri_unescape ($tmp->{fmt_url_map})) { ++ my ($id, $url) = split /\|/, $_; ++ $best = $url unless $best; ++ $h{$id} = $url; ++ } + +- $xurl .= "&asv=2"; # Should fix the http/404 issue (#58). ++ my $url; + + my $config = clive::Config->instance->config; + +- my $fmt; +- +- if ( $config->{format} eq "best" ) { +- $fmt = $1 +- if ( $$content =~ /&fmt_map=(\d+)/ && $1 ne "" ); ++ if ($config->{format} eq 'best') { ++ $url = $best; + } + else { +- $fmt = $1 +- if toFmt( $self, $config->{format} ) =~ /^fmt(.*)$/; ++ $url = toURL ($self, $config->{format}, \%h); ++ $url = toURL ($self, 'default', \%h) unless $url; + } + +- $xurl .= "&fmt=$fmt" +- if $fmt; +- +- $$props->video_id( $tmp->{id} ); +- $$props->video_link($xurl); ++ $$props->video_id ($tmp->{id}); ++ $$props->video_link ($url); + +- return (0); ++ return 0; + } +- return (1); ++ ++ return 1; ++} ++ ++sub toURL { ++ my ($self, $fmt, $h) = @_; ++ ++ $fmt = 'flv_240p' if $fmt eq 'default'; ++ $fmt = toFmt ($self, $fmt); ++ ++ foreach (keys %{$h}) ++ { return $$h{$_} if $_ eq $fmt; } ++ ++ return undef; + } + + sub toFmt { +- my ( $self, $id ) = @_; +- $id =~ s/hd/fmt22/; +- $id =~ s/hq/fmt35/; +- $id =~ s/mp4/fmt18/; +- +- # $id =~ s/fmt34/flv/; # Previously assumed to be the "youtube default format" +- $id =~ s/3gp/fmt17/; +- return ($id); ++ my ($self, $id) = @_; ++ ++# http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs ++# $container_$maxwidth = '$fmt_id' ++ ++ my %h = ( ++ # flv ++ flv_240p => '5', ++ flv_360p => '34', ++ flv_480p => '35', ++ # mp4 ++ mp4_360p => '18', ++ mp4_720p => '22', ++ mp4_1080p => '37', ++ mp4_3072p => '38', ++ # webm ++ webm_480p => '43', ++ webm_720p => '45', ++ # 3gp ++ '3gp_144p'=> '17', ++ ++# For backward-compatibility only. ++ mobile => '17', ++ sd_270p => "18", ++ sd_360p => "34", ++ hq_480p => "35", ++ hd_720p => "22", ++ hd_1080p => "37", ++ webm_480p => "43", ++ webm_720p => "45", ++ '3gp' => "17", ++ mp4 => "18", ++ hq => "35", ++ hd => "22", ++ ); ++ ++ foreach (keys %h) ++ { return $h{$_} if $id eq $_; } ++ ++ return $id; + } + + 1; diff -Nru clive-2.2.13/debian/patches/series clive-2.2.13/debian/patches/series --- clive-2.2.13/debian/patches/series 2010-09-04 15:12:15.000000000 +0200 +++ clive-2.2.13/debian/patches/series 2010-12-12 10:23:04.000000000 +0100 @@ -1,2 +1,3 @@ fix-path-encoding-60.patch 595486-vimeo.patch +fix-606540-youtube.patch
Attachment:
signature.asc
Description: Digital signature