summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-video/get_flash_videos
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-video/get_flash_videos')
-rw-r--r--media-video/get_flash_videos/Manifest1
-rw-r--r--media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch100
-rw-r--r--media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild61
-rw-r--r--media-video/get_flash_videos/get_flash_videos-9999.ebuild52
-rw-r--r--media-video/get_flash_videos/metadata.xml13
5 files changed, 227 insertions, 0 deletions
diff --git a/media-video/get_flash_videos/Manifest b/media-video/get_flash_videos/Manifest
new file mode 100644
index 000000000000..41f0fedd56f8
--- /dev/null
+++ b/media-video/get_flash_videos/Manifest
@@ -0,0 +1 @@
+DIST App-get_flash_videos-1.24.tar.gz 82383 SHA256 9d402facf8d6adfd55365662902ab58a5cb5f0f56861385bed944e22052f9133 SHA512 e726a50e9301e40193ad34a555fbbcd9cc26da4ef9157ef42a41bd54e500b482e9bcbeea5c474f89e83c9af4154ad41ce9a1b5430299cbb5a1c6c256c78c5b32 WHIRLPOOL 1430a38e75637e8bd5623e4824607d78c8563676f3bc7b317ba6258a8c30b7eff55945c6fdf5a3230c8b894d34a3e7a29c57b2607abd1eea5b39a00aa9196bb9
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
new file mode 100644
index 000000000000..0bca2bbd450d
--- /dev/null
+++ b/media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch
@@ -0,0 +1,100 @@
+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
new file mode 100644
index 000000000000..9bef5ee6db4d
--- /dev/null
+++ b/media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="http://code.google.com/p/get-flash-videos/"
+SRC_URI="http://get-flash-videos.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~arm-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
+}
diff --git a/media-video/get_flash_videos/get_flash_videos-9999.ebuild b/media-video/get_flash_videos/get_flash_videos-9999.ebuild
new file mode 100644
index 000000000000..638ba3da66cd
--- /dev/null
+++ b/media-video/get_flash_videos/get_flash_videos-9999.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils perl-module git-2
+
+MY_PN="App-${PN}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Downloads videos from various Flash-based video hosting sites"
+HOMEPAGE="http://code.google.com/p/get-flash-videos/"
+EGIT_REPO_URI="git://github.com/monsieurvideo/get-flash-videos.git"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS=""
+IUSE="test"
+
+RDEPEND="dev-perl/WWW-Mechanize
+ virtual/perl-Module-CoreList
+ dev-perl/HTML-TokeParser-Simple
+ dev-perl/Module-Find"
+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() {
+ perl-module_src_prepare
+}
+
+pkg_postinst() {
+ elog "Downloading videos from RTMP server requires the following packages :"
+ elog " media-video/rtmpdump"
+ elog " dev-perl/Tie-IxHash"
+ elog "Others optional dependencies :"
+ elog " dev-perl/XML-Simple"
+ elog " dev-perl/Crypt-Rijndael"
+ elog " dev-perl/Data-AMF"
+ elog " virtual/perl-IO-Compress"
+}
diff --git a/media-video/get_flash_videos/metadata.xml b/media-video/get_flash_videos/metadata.xml
new file mode 100644
index 000000000000..a1ae20d2a71a
--- /dev/null
+++ b/media-video/get_flash_videos/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <longdescription lang="en">
+ </longdescription>
+ <upstream>
+ <remote-id type="google-code">get-flash-videos</remote-id>
+ </upstream>
+</pkgmetadata>