1 |
commit: 798cd433e846717f199b50a4ef20b7be60097597 |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 17 18:19:26 2019 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 17 18:19:26 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=798cd433 |
7 |
|
8 |
media-video/get_flash_videos: Drop old |
9 |
|
10 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
media-video/get_flash_videos/Manifest | 1 - |
14 |
.../files/get_flash_videos-youtubefix.patch | 100 --------------------- |
15 |
.../get_flash_videos-1.24-r1.ebuild | 60 ------------- |
16 |
3 files changed, 161 deletions(-) |
17 |
|
18 |
diff --git a/media-video/get_flash_videos/Manifest b/media-video/get_flash_videos/Manifest |
19 |
index 92eb20c9f5a..48e309b823b 100644 |
20 |
--- a/media-video/get_flash_videos/Manifest |
21 |
+++ b/media-video/get_flash_videos/Manifest |
22 |
@@ -1,2 +1 @@ |
23 |
-DIST get_flash_videos-1.24.tar.gz 86380 BLAKE2B 6a391a3e9c31cbedb76dc0846a601af6c0ad730e1b81bcadab1d1efca80fb87c1bbd0310da962076fd5d166e2d776a77edcfa8ee1076fddf508518bcdd7053f2 SHA512 b966adc381ddf096f9f57ddd3ce0a9a155b3850f345b0624f11b4c553036f1e8881cf7c70e4f789741a43263325e35653f005731563702b6d7a594530558fc48 |
24 |
DIST get_flash_videos-1.25.94.tar.gz 136922 BLAKE2B c353fd5396a6dcd0a759538d16d8237a1f137308d2cc2bbacdd78f6adfc7542b9603d0b63f7d94203dda2611d4972d8d8699aa64863175d7c8cbb148a622c9d3 SHA512 f7ec42e763aa83d8aaa5ac0481785ef6197f0f34ff3b3b2209e63767eb8116d5fb75f85732fa37c7e56729bc83b7d4d57dcf5cab954d9f439d21ad00badbdacf |
25 |
|
26 |
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 |
27 |
deleted file mode 100644 |
28 |
index 0bca2bbd450..00000000000 |
29 |
--- a/media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch |
30 |
+++ /dev/null |
31 |
@@ -1,100 +0,0 @@ |
32 |
-https://bugs.gentoo.org/show_bug.cgi?id=405761 |
33 |
- |
34 |
-https://github.com/richcollins/get-flash-videos/commit/27e0f1d214e291debfd567b1652908d0ef6b79d1#lib/FlashVideo/Site |
35 |
- |
36 |
---- lib/FlashVideo/Site/Youtube.pm~ 2010-11-30 14:34:17.000000000 +0000 |
37 |
-+++ lib/FlashVideo/Site/Youtube.pm 2012-02-20 23:56:35.000000000 +0000 |
38 |
-@@ -26,6 +26,7 @@ |
39 |
- if($embed_url !~ m!youtube\.com/watch!) { |
40 |
- $browser->get($embed_url); |
41 |
- if ($browser->response->header('Location') =~ m!/swf/.*video_id=([^&]+)! |
42 |
-+ || $browser->content =~ m!\<iframe[^\>]*src="http://www.youtube.com/embed/([^"]+)"!i |
43 |
- || $embed_url =~ m!/v/([-_a-z0-9]+)!i |
44 |
- || $browser->uri =~ m!v%3D([-_a-z0-9]+)!i) { |
45 |
- # We ended up on a embedded SWF or other redirect page |
46 |
-@@ -48,12 +49,19 @@ |
47 |
- # If the page contains fmt_url_map, then process this. With this, we |
48 |
- # don't require the 't' parameter. |
49 |
- if ($browser->content =~ /["']fmt_url_map["']:\s{0,3}(["'][^"']+["'])/) { |
50 |
-- debug "Using fmt_url_map method from page ($1)"; |
51 |
-- return $self->download_fmt_map($prefs, $browser, $title, {}, @{from_json $1}); |
52 |
-+ my $fmt_map = $1; |
53 |
-+ if ($fmt_map !~ /\|/) { |
54 |
-+ # $fmt_map is double escaped. We should unescape it here just |
55 |
-+ # once. Be careful not to unescape ',' in the URL. |
56 |
-+ $fmt_map = uri_unescape($fmt_map); |
57 |
-+ } |
58 |
-+ debug "Using fmt_url_map method from page ($fmt_map)"; |
59 |
-+ return $self->download_fmt_map($prefs, $browser, $title, {}, @{from_json $fmt_map}); |
60 |
- } |
61 |
- |
62 |
- my $video_id; |
63 |
- if ($browser->content =~ /(?:var pageVideoId =|(?:CFG_)?VIDEO_ID'?\s*:)\s*'(.+?)'/ |
64 |
-+ || $browser->content =~ /"video_id": "([^"]+)"/ |
65 |
- || $embed_url =~ /v=([^&]+)/) { |
66 |
- $video_id = $1; |
67 |
- } else { |
68 |
-@@ -125,6 +133,9 @@ |
69 |
- } elsif($info{fmt_url_map}) { |
70 |
- debug "Using fmt_url_map method from info"; |
71 |
- return $self->download_fmt_map($prefs, $browser, $title, \%info, $info{fmt_url_map}); |
72 |
-+ } elsif($info{url_encoded_fmt_stream_map}) { |
73 |
-+ debug "Using url_encoded_fmt_stream_map method from info"; |
74 |
-+ return $self->download_url_encoded_fmt_stream_map($prefs, $browser, $title, \%info, $info{url_encoded_fmt_stream_map}); |
75 |
- } |
76 |
- } |
77 |
- |
78 |
-@@ -132,6 +143,53 @@ |
79 |
- return download_get_video($browser, $prefs, $video_id, $title, $t); |
80 |
- } |
81 |
- |
82 |
-+sub download_url_encoded_fmt_stream_map { |
83 |
-+ my($self, $prefs, $browser, $title, $info, $fmt_map) = @_; |
84 |
-+ |
85 |
-+ my $fmt_url_map = parse_youtube_url_encoded_fmt_stream_map($fmt_map); |
86 |
-+ |
87 |
-+ if (!$title and $browser->uri->as_string =~ m'/user/.*?#') { |
88 |
-+ my $video_id = (split /\//, $browser->uri->fragment)[-1]; |
89 |
-+ |
90 |
-+ my %info = get_youtube_video_info($browser->clone, $video_id); |
91 |
-+ |
92 |
-+ $title = $info->{title}; |
93 |
-+ } |
94 |
-+ |
95 |
-+ my $preferred_quality = $prefs->quality->choose(map { $fmt_url_map->{$_->{id}} |
96 |
-+ ? { resolution => $_->{resolution}, url => $fmt_url_map->{$_->{id}} } |
97 |
-+ : () } @formats); |
98 |
-+ |
99 |
-+ $browser->allow_redirects; |
100 |
-+ |
101 |
-+ return $preferred_quality->{url}, title_to_filename($title, "mp4"); |
102 |
-+} |
103 |
-+ |
104 |
-+sub parse_youtube_url_encoded_fmt_stream_map { |
105 |
-+ my($raw_map) = @_;; |
106 |
-+ |
107 |
-+ my $map = {}; |
108 |
-+ |
109 |
-+ foreach my $params (split /,/, $raw_map) { |
110 |
-+ |
111 |
-+ my $format = ""; |
112 |
-+ my $url = ""; |
113 |
-+ |
114 |
-+ foreach my $pair (split /&/, $params) { |
115 |
-+ my ($name, $value) = split /=/, $pair; |
116 |
-+ if ($name eq "itag"){ |
117 |
-+ $format = $value; |
118 |
-+ } elsif ($name eq "url") { |
119 |
-+ $url = uri_unescape($value); |
120 |
-+ } |
121 |
-+ } |
122 |
-+ |
123 |
-+ $map->{$format} = $url; |
124 |
-+ } |
125 |
-+ |
126 |
-+ return $map; |
127 |
-+} |
128 |
-+ |
129 |
- sub download_fmt_map { |
130 |
- my($self, $prefs, $browser, $title, $info, $fmt_map) = @_; |
131 |
- |
132 |
|
133 |
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 |
134 |
deleted file mode 100644 |
135 |
index 833c8d61d59..00000000000 |
136 |
--- a/media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild |
137 |
+++ /dev/null |
138 |
@@ -1,60 +0,0 @@ |
139 |
-# Copyright 1999-2017 Gentoo Foundation |
140 |
-# Distributed under the terms of the GNU General Public License v2 |
141 |
- |
142 |
-EAPI=5 |
143 |
-inherit eutils perl-module readme.gentoo |
144 |
- |
145 |
-MY_PN="App-${PN}" |
146 |
-MY_P="${MY_PN}-${PV}" |
147 |
- |
148 |
-DESCRIPTION="Downloads videos from various Flash-based video hosting sites" |
149 |
-HOMEPAGE="https://github.com/monsieurvideo/get-flash-videos" |
150 |
-SRC_URI="https://github.com/monsieurvideo/get-flash-videos/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
151 |
- |
152 |
-LICENSE="Apache-2.0" |
153 |
-SLOT="0" |
154 |
-KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" |
155 |
-IUSE="test" |
156 |
- |
157 |
-RDEPEND="dev-perl/WWW-Mechanize |
158 |
- virtual/perl-Module-CoreList |
159 |
- dev-perl/HTML-TokeParser-Simple" |
160 |
-DEPEND="${RDEPEND} |
161 |
- dev-perl/UNIVERSAL-require |
162 |
- test? ( media-video/rtmpdump |
163 |
- dev-perl/Tie-IxHash |
164 |
- dev-perl/XML-Simple |
165 |
- dev-perl/Crypt-Rijndael |
166 |
- dev-perl/Data-AMF |
167 |
- virtual/perl-IO-Compress )" |
168 |
- |
169 |
-SRC_TEST="do" |
170 |
- |
171 |
-S="${WORKDIR}/${MY_P}" |
172 |
-SRC_TEST="do" |
173 |
-myinst="DESTDIR=${D}" |
174 |
- |
175 |
-src_prepare() { |
176 |
- DISABLE_AUTOFORMATTING="yes" |
177 |
- DOC_CONTENTS="Downloading videos from RTMP server requires the following packages: |
178 |
-- media-video/rtmpdump |
179 |
-- dev-perl/Tie-IxHash |
180 |
-Other optional dependencies: |
181 |
-- dev-perl/XML-Simple |
182 |
-- dev-perl/Crypt-Rijndael |
183 |
-- dev-perl/Data-AMF |
184 |
-- virtual/perl-IO-Compress" |
185 |
- |
186 |
- # 405761 |
187 |
- epatch "${FILESDIR}"/${PN}-youtubefix.patch |
188 |
- perl-module_src_prepare |
189 |
-} |
190 |
- |
191 |
-src_install() { |
192 |
- perl-module_src_install |
193 |
- readme.gentoo_create_doc |
194 |
-} |
195 |
- |
196 |
-pkg_postinst() { |
197 |
- readme.gentoo_print_elog |
198 |
-} |