diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2012-07-11 19:51:17 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2012-07-11 19:51:17 +0000 |
commit | 7c34de8f3a3d5a1627ec6b161ff4b0529fba121e (patch) | |
tree | ab34f81875fc5b5ce5a8e9f723a6b71334c2acbb /media-video/xvideoservicethief | |
parent | Marking libXfont-1.4.5 ppc64 for bug 419473 (diff) | |
download | gentoo-2-7c34de8f3a3d5a1627ec6b161ff4b0529fba121e.tar.gz gentoo-2-7c34de8f3a3d5a1627ec6b161ff4b0529fba121e.tar.bz2 gentoo-2-7c34de8f3a3d5a1627ec6b161ff4b0529fba121e.zip |
Revbump to fix problems with recent youtube changes
(Portage version: 2.1.11.5/cvs/Linux x86_64)
Diffstat (limited to 'media-video/xvideoservicethief')
3 files changed, 121 insertions, 17 deletions
diff --git a/media-video/xvideoservicethief/ChangeLog b/media-video/xvideoservicethief/ChangeLog index 669e50e456a1..20874a0eaf83 100644 --- a/media-video/xvideoservicethief/ChangeLog +++ b/media-video/xvideoservicethief/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-video/xvideoservicethief -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/xvideoservicethief/ChangeLog,v 1.27 2011/08/26 14:26:51 hwoarang Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/xvideoservicethief/ChangeLog,v 1.28 2012/07/11 19:51:16 hwoarang Exp $ + +*xvideoservicethief-2.4.1-r2 (11 Jul 2012) + + 11 Jul 2012; Markos Chandras <hwoarang@gentoo.org> + +xvideoservicethief-2.4.1-r2.ebuild, + files/xvideoservicethief-2.4.1-youtube-api.patch: + Revbump to fix problems with recent youtube changes 26 Aug 2011; Markos Chandras <hwoarang@gentoo.org> -xvideoservicethief-2.4.1.ebuild: @@ -131,4 +138,3 @@ 14 Mar 2009; Ben de Groot <yngwin@gentoo.org> +files/gcc-4.3.patch, +metadata.xml, +xvideoservicethief-1.8.2.ebuild: Initial import from qting-edge overlay. See also bug 210894. - diff --git a/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch index 50f6bbe445d7..7bffe12f0d0d 100644 --- a/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch +++ b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch @@ -1,11 +1,11 @@ ---- resources/services/youtube/youtube.js 2010/09/02 11:52:07 911 -+++ resources/services/youtube/youtube.js 2011/08/06 23:30:28 961 +--- trunk/resources/services/youtube/youtube.js 2010/09/02 11:52:07 911 ++++ trunk/resources/services/youtube/youtube.js 2012/05/08 17:34:53 975 @@ -3,7 +3,7 @@ * This file is part of xVideoServiceThief, * an open-source cross-platform Video service download * -* Copyright (C) 2007 - 2010 Xesc & Technology -+* Copyright (C) 2007 - 2011 Xesc & Technology ++* Copyright (C) 2007 - 2012 Xesc & Technology * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,14 +14,31 @@ function RegistVideoService() { - this.version = "2.1.5"; -+ this.version = "3.0.1"; ++ this.version = "3.0.6"; this.minVersion = "2.0.0a"; - this.author = "Xesc & Technology 2009"; -+ this.author = "Xesc & Technology 2011"; ++ this.author = "Xesc & Technology 2012"; this.website = "http://www.youtube.com/"; this.ID = "youtube.com"; this.caption = "YouTube"; -@@ -55,32 +55,103 @@ +@@ -38,7 +38,6 @@ + function getVideoInformation(url) + { + const URL_YOUTBE = "http://www.youtube.com/watch?v=%1"; +- const HD_VIDEO_RES = "22"; + // init result + var result = new VideoDefinition(); + // default URL +@@ -52,35 +51,112 @@ + embededID = strRemove(embededID, 0, embededID.lastIndexOf("/v/") + 3); + youTubeURL = strFormat(URL_YOUTBE, embededID); + } ++ // cehck if is an embeded video (v2) ++ else if (youTubeURL.toString().indexOf("/embed/") != -1) ++ { ++ var embededID = copyBetween(youTubeURL + "?", "/embed/", "?"); ++ youTubeURL = strFormat(URL_YOUTBE, embededID); ++ } // download webpage var http = new Http(); var html = http.downloadWebpage(youTubeURL); @@ -34,7 +51,7 @@ + result.title = strReplace(result.title, " - YouTube", ""); // check if this video need a login - result.needLogin = result.title == "Broadcast Yourself."; -+ result.needLogin = strIndexOf(html, "signing_in") != -1; ++ result.needLogin = strIndexOf(html, 'id="verify-details"') != -1; // if we can continue (no loggin needed) if (result.needLogin) return result; - // get the video info block @@ -65,9 +82,9 @@ + // init result + var result = { url:null, extension:null }; + // get the flashVars value -+ var flashVars = "?" + copyBetween(html, 'flashvars="', '"'); ++ var flashVars = "?" + copyBetween(html, 'flashvars=\\"', '\\"'); + // convert each "&" into "&" -+ flashVars = strReplace(flashVars, "&", "&"); ++ flashVars = strReplace(flashVars, "\\u0026amp;", "&"); + // get an array with all fmt_stream_map values + var fmt_stream_map_arr = splitString(getUrlParam(flashVars, "url_encoded_fmt_stream_map"), "url%3D", false); + // default selected video quality @@ -141,7 +158,7 @@ /* This function "normalizeSpaces(str)" will be deprecated on next xVST version and replaced with the new "simplifyString(str)" function (added in xVST 2.3.1) -@@ -99,9 +170,11 @@ +@@ -99,9 +175,11 @@ function searchVideos(keyWord, pageIndex) { const URL_SEARCH = "http://www.youtube.com/results?search_query=%1&page=%2&hl=%3"; @@ -149,14 +166,14 @@ - const HTML_SEARCH_FINISH = "<!-- end search results -->"; - const HTML_SEARCH_SEPARATOR = '<div class="video-entry">'; + const HTML_SEARCH_START = '<div id="search-results">'; -+ const HTML_SEARCH_FINISH = '<span id="search-pva-content">'; -+ const HTML_SEARCH_SEPARATOR = '<div class="result-item *sr ">'; ++ const HTML_SEARCH_FINISH = '<div id="search-pva-content">'; ++ const HTML_SEARCH_SEPARATOR = '<div class="thumb-container">'; + const HTML_SEARCH_SUMMARY_START = '<p class="num-results">'; + const HTML_SEARCH_SUMMARY_END = '</p>'; // replace all spaces for "+" keyWord = strReplace(keyWord, " ", "+"); // init search results object -@@ -110,7 +183,7 @@ +@@ -110,7 +188,7 @@ var http = new Http(); var html = http.downloadWebpage(strFormat(URL_SEARCH, keyWord, pageIndex, searchResults.getUserLanguage())); // get the search summary @@ -165,7 +182,7 @@ searchResults.setSummary(cleanSummary(summary)); // get results html block var htmlResults = copyBetween(html, HTML_SEARCH_START, HTML_SEARCH_FINISH); -@@ -148,14 +221,17 @@ +@@ -148,14 +226,17 @@ var tmp, videoUrl, imageUrl, title, description, duration, rating; // get video url videoUrl = VIDEO_URL + copyBetween(html, 'href="', '"'); diff --git a/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild b/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild new file mode 100644 index 000000000000..3d718361f71a --- /dev/null +++ b/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild,v 1.1 2012/07/11 19:51:16 hwoarang Exp $ + +EAPI=2 + +LANGS="br ca cs da de es fr gl hu it ja ko nl pl ro ru sv" + +inherit eutils qt4-r2 versionator + +MY_PV=$(replace_all_version_separators '_') +MY_P="xVST_${MY_PV}_src" + +DESCRIPTION="Download (and convert) videos from various Web Video Services" +HOMEPAGE="http://xviservicethief.sourceforge.net/" +SRC_URI="mirror://sourceforge/xviservicethief/${MY_P}.zip" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc" + +DEPEND="app-arch/unzip + >=x11-libs/qt-gui-4.5.3:4 + >=x11-libs/qt-webkit-4.5.3:4 + doc? ( app-doc/doxygen )" +RDEPEND=">=x11-libs/qt-gui-4.5.3:4 + virtual/ffmpeg + media-video/flvstreamer" + +RES_NAME="xVST" + +S="${WORKDIR}" + +src_prepare() { + # fix translations + mv "${S}"/resources/translations/${RES_NAME}_cz.ts \ + "${S}"/resources/translations/${RES_NAME}_cs.ts ||die + mv "${S}"/resources/translations/${RES_NAME}_jp.ts \ + "${S}"/resources/translations/${RES_NAME}_ja.ts || die + mv "${S}"/resources/translations/${RES_NAME}_du.ts \ + "${S}"/resources/translations/${RES_NAME}_nl.ts || die + mv "${S}"/resources/translations/${RES_NAME}_kr.ts \ + "${S}"/resources/translations/${RES_NAME}_ko.ts || die + # fix plugins, language path + sed -i -e "s/getApplicationPath()\ +\ \"/\"\/usr\/share\/${PN}/g" \ + "${S}"/src/options.cpp || die "failed to fix paths" + epatch "${FILESDIR}"/${P}-youtube-api.patch +} + +src_compile() { + local lang= + emake || die "emake failed" + for lang in "${S}"/resources/translations/*.ts; do + lrelease ${lang} + done +} + +src_install() { + dobin bin/xvst || die "dobin failed" + local dest=/usr/share/${PN}/plugins + dodir ${dest} + find resources/services -name '*.js' -exec cp -dpR {} "${D}"${dest} \; + newicon resources/images/InformationLogo.png xvst.png + make_desktop_entry /usr/bin/xvst xVideoServiceThief xvst 'Qt;AudioVideo;Video' + if use doc; then + cd "${S}/documentation/source" + sed -i "/OUTPUT_DIRECTORY/s:G\:.*:docs:" Doxyfile + doxygen Doxyfile + dohtml -r docs/html/* || die "dohtml failed" + fi + + #install translations + insinto /usr/share/${PN}/languages/ + local lang= tlang= + for lang in ${LINGUAS}; do + for tlang in ${LANGS}; do + [[ ${lang} == ${tlang} ]] && doins "${S}"/resources/translations/xVST_${tlang}.qm + done + done +} |