On Fri, 05 Aug 2011, Marc Espie wrote: > > > So that's www/youtube-dl, net/yt, and www/p5-WWW-YouTube-Download... > > > any others? > > > > www/minitube too :( > > Doesn't fall under the "one minute to repackage", I'm afraid. > > But I'll let naddy/jasper have the final word about that one.
Here's the diff btw... ciao, David Index: Makefile =================================================================== RCS file: /cvs/ports/www/minitube/Makefile,v retrieving revision 1.12 diff -u -p -r1.12 Makefile --- Makefile 17 May 2011 11:33:46 -0000 1.12 +++ Makefile 6 Aug 2011 13:15:31 -0000 @@ -3,6 +3,7 @@ COMMENT = standalone YouTube.com video browser/player DISTNAME = minitube-1.4.3 +REVISION = 0 CATEGORIES = www multimedia HOMEPAGE = http://flavio.tordini.org/minitube Index: patches/patch-src_video_cpp =================================================================== RCS file: patches/patch-src_video_cpp diff -N patches/patch-src_video_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_video_cpp 6 Aug 2011 13:15:31 -0000 @@ -0,0 +1,45 @@ +$OpenBSD$ + +Fix for YouTube changes +(upstream git commit 711f07b1584e3497b653cab90acfaef9cc4ddb9e) + +--- src/video.cpp.orig Sun May 15 22:39:39 2011 ++++ src/video.cpp Sat Aug 6 15:00:35 2011 +@@ -125,7 +125,7 @@ void Video::gotVideoInfo(QByteArray data) { + this->videoToken = videoToken; + + // get fmt_url_map +- re = QRegExp("^.*&fmt_url_map=([^&]+).*$"); ++ re = QRegExp("^.*&url_encoded_fmt_stream_map=([^&]+).*$"); + match = re.exactMatch(videoInfo); + // handle regexp failure + if (!match || re.numCaptures() < 1) { +@@ -146,10 +146,24 @@ void Video::gotVideoInfo(QByteArray data) { + QStringList formatUrls = fmtUrlMap.split(",", QString::SkipEmptyParts); + QHash<int, QString> urlMap; + foreach(QString formatUrl, formatUrls) { +- int separator = formatUrl.indexOf("|"); +- if (separator == -1) continue; +- int format = formatUrl.left(separator).toInt(); +- QString url = formatUrl.mid(separator + 1); ++ // formatUrl = QByteArray::fromPercentEncoding(formatUrl.toUtf8()); ++ qDebug() << "formatUrl" << formatUrl; ++ QStringList urlParams = formatUrl.split("&", QString::SkipEmptyParts); ++ // qDebug() << "urlParams" << urlParams; ++ ++ int format = -1; ++ QString url; ++ foreach(QString urlParam, urlParams) { ++ if (urlParam.startsWith("itag=")) { ++ int separator = urlParam.indexOf("="); ++ format = urlParam.mid(separator + 1).toInt(); ++ } else if (urlParam.startsWith("url=")) { ++ int separator = urlParam.indexOf("="); ++ url = urlParam.mid(separator + 1); ++ url = QByteArray::fromPercentEncoding(url.toUtf8()); ++ } ++ } ++ if (format == -1 || url.isNull()) continue; + + if (format == definitionCode) { + qDebug() << "Found format" << definitionCode;