diff options
author | Mikle Kolyada <zlogene@gentoo.org> | 2019-01-17 21:19:26 +0300 |
---|---|---|
committer | Mikle Kolyada <zlogene@gentoo.org> | 2019-01-17 21:19:26 +0300 |
commit | 798cd433e846717f199b50a4ef20b7be60097597 (patch) | |
tree | d34074656761198cec39bd52fb8876886870d252 /media-video | |
parent | media-video/get_flash_videos: amd64 stable wrt bug #626620 (diff) | |
download | gentoo-798cd433e846717f199b50a4ef20b7be60097597.tar.gz gentoo-798cd433e846717f199b50a4ef20b7be60097597.tar.bz2 gentoo-798cd433e846717f199b50a4ef20b7be60097597.zip |
media-video/get_flash_videos: Drop old
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'media-video')
3 files changed, 0 insertions, 161 deletions
diff --git a/media-video/get_flash_videos/Manifest b/media-video/get_flash_videos/Manifest index 92eb20c9f5af..48e309b823bd 100644 --- a/media-video/get_flash_videos/Manifest +++ b/media-video/get_flash_videos/Manifest @@ -1,2 +1 @@ -DIST get_flash_videos-1.24.tar.gz 86380 BLAKE2B 6a391a3e9c31cbedb76dc0846a601af6c0ad730e1b81bcadab1d1efca80fb87c1bbd0310da962076fd5d166e2d776a77edcfa8ee1076fddf508518bcdd7053f2 SHA512 b966adc381ddf096f9f57ddd3ce0a9a155b3850f345b0624f11b4c553036f1e8881cf7c70e4f789741a43263325e35653f005731563702b6d7a594530558fc48 DIST get_flash_videos-1.25.94.tar.gz 136922 BLAKE2B c353fd5396a6dcd0a759538d16d8237a1f137308d2cc2bbacdd78f6adfc7542b9603d0b63f7d94203dda2611d4972d8d8699aa64863175d7c8cbb148a622c9d3 SHA512 f7ec42e763aa83d8aaa5ac0481785ef6197f0f34ff3b3b2209e63767eb8116d5fb75f85732fa37c7e56729bc83b7d4d57dcf5cab954d9f439d21ad00badbdacf diff --git a/media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch b/media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch deleted file mode 100644 index 0bca2bbd450d..000000000000 --- a/media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch +++ /dev/null @@ -1,100 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=405761 - -https://github.com/richcollins/get-flash-videos/commit/27e0f1d214e291debfd567b1652908d0ef6b79d1#lib/FlashVideo/Site - ---- lib/FlashVideo/Site/Youtube.pm~ 2010-11-30 14:34:17.000000000 +0000 -+++ lib/FlashVideo/Site/Youtube.pm 2012-02-20 23:56:35.000000000 +0000 -@@ -26,6 +26,7 @@ - if($embed_url !~ m!youtube\.com/watch!) { - $browser->get($embed_url); - if ($browser->response->header('Location') =~ m!/swf/.*video_id=([^&]+)! -+ || $browser->content =~ m!\<iframe[^\>]*src="http://www.youtube.com/embed/([^"]+)"!i - || $embed_url =~ m!/v/([-_a-z0-9]+)!i - || $browser->uri =~ m!v%3D([-_a-z0-9]+)!i) { - # We ended up on a embedded SWF or other redirect page -@@ -48,12 +49,19 @@ - # If the page contains fmt_url_map, then process this. With this, we - # don't require the 't' parameter. - if ($browser->content =~ /["']fmt_url_map["']:\s{0,3}(["'][^"']+["'])/) { -- debug "Using fmt_url_map method from page ($1)"; -- return $self->download_fmt_map($prefs, $browser, $title, {}, @{from_json $1}); -+ my $fmt_map = $1; -+ if ($fmt_map !~ /\|/) { -+ # $fmt_map is double escaped. We should unescape it here just -+ # once. Be careful not to unescape ',' in the URL. -+ $fmt_map = uri_unescape($fmt_map); -+ } -+ debug "Using fmt_url_map method from page ($fmt_map)"; -+ return $self->download_fmt_map($prefs, $browser, $title, {}, @{from_json $fmt_map}); - } - - my $video_id; - if ($browser->content =~ /(?:var pageVideoId =|(?:CFG_)?VIDEO_ID'?\s*:)\s*'(.+?)'/ -+ || $browser->content =~ /"video_id": "([^"]+)"/ - || $embed_url =~ /v=([^&]+)/) { - $video_id = $1; - } else { -@@ -125,6 +133,9 @@ - } elsif($info{fmt_url_map}) { - debug "Using fmt_url_map method from info"; - return $self->download_fmt_map($prefs, $browser, $title, \%info, $info{fmt_url_map}); -+ } elsif($info{url_encoded_fmt_stream_map}) { -+ debug "Using url_encoded_fmt_stream_map method from info"; -+ return $self->download_url_encoded_fmt_stream_map($prefs, $browser, $title, \%info, $info{url_encoded_fmt_stream_map}); - } - } - -@@ -132,6 +143,53 @@ - return download_get_video($browser, $prefs, $video_id, $title, $t); - } - -+sub download_url_encoded_fmt_stream_map { -+ my($self, $prefs, $browser, $title, $info, $fmt_map) = @_; -+ -+ my $fmt_url_map = parse_youtube_url_encoded_fmt_stream_map($fmt_map); -+ -+ if (!$title and $browser->uri->as_string =~ m'/user/.*?#') { -+ my $video_id = (split /\//, $browser->uri->fragment)[-1]; -+ -+ my %info = get_youtube_video_info($browser->clone, $video_id); -+ -+ $title = $info->{title}; -+ } -+ -+ my $preferred_quality = $prefs->quality->choose(map { $fmt_url_map->{$_->{id}} -+ ? { resolution => $_->{resolution}, url => $fmt_url_map->{$_->{id}} } -+ : () } @formats); -+ -+ $browser->allow_redirects; -+ -+ return $preferred_quality->{url}, title_to_filename($title, "mp4"); -+} -+ -+sub parse_youtube_url_encoded_fmt_stream_map { -+ my($raw_map) = @_;; -+ -+ my $map = {}; -+ -+ foreach my $params (split /,/, $raw_map) { -+ -+ my $format = ""; -+ my $url = ""; -+ -+ foreach my $pair (split /&/, $params) { -+ my ($name, $value) = split /=/, $pair; -+ if ($name eq "itag"){ -+ $format = $value; -+ } elsif ($name eq "url") { -+ $url = uri_unescape($value); -+ } -+ } -+ -+ $map->{$format} = $url; -+ } -+ -+ return $map; -+} -+ - sub download_fmt_map { - my($self, $prefs, $browser, $title, $info, $fmt_map) = @_; - diff --git a/media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild b/media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild deleted file mode 100644 index 833c8d61d59c..000000000000 --- a/media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit eutils perl-module readme.gentoo - -MY_PN="App-${PN}" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="Downloads videos from various Flash-based video hosting sites" -HOMEPAGE="https://github.com/monsieurvideo/get-flash-videos" -SRC_URI="https://github.com/monsieurvideo/get-flash-videos/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" -IUSE="test" - -RDEPEND="dev-perl/WWW-Mechanize - virtual/perl-Module-CoreList - dev-perl/HTML-TokeParser-Simple" -DEPEND="${RDEPEND} - dev-perl/UNIVERSAL-require - test? ( media-video/rtmpdump - dev-perl/Tie-IxHash - dev-perl/XML-Simple - dev-perl/Crypt-Rijndael - dev-perl/Data-AMF - virtual/perl-IO-Compress )" - -SRC_TEST="do" - -S="${WORKDIR}/${MY_P}" -SRC_TEST="do" -myinst="DESTDIR=${D}" - -src_prepare() { - DISABLE_AUTOFORMATTING="yes" - DOC_CONTENTS="Downloading videos from RTMP server requires the following packages: -- media-video/rtmpdump -- dev-perl/Tie-IxHash -Other optional dependencies: -- dev-perl/XML-Simple -- dev-perl/Crypt-Rijndael -- dev-perl/Data-AMF -- virtual/perl-IO-Compress" - - # 405761 - epatch "${FILESDIR}"/${PN}-youtubefix.patch - perl-module_src_prepare -} - -src_install() { - perl-module_src_install - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog -} |