Hello community, here is the log from the commit of package minitube for openSUSE:Factory checked in at 2020-02-03 11:14:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/minitube (Old) and /work/SRC/openSUSE:Factory/.minitube.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "minitube" Mon Feb 3 11:14:54 2020 rev:15 rq:769345 version:3.3 Changes: -------- --- /work/SRC/openSUSE:Factory/minitube/minitube.changes 2019-12-06 12:12:19.356026561 +0100 +++ /work/SRC/openSUSE:Factory/.minitube.new.26092/minitube.changes 2020-02-03 11:14:59.517895686 +0100 @@ -1,0 +2,8 @@ +Sun Feb 2 07:30:21 UTC 2020 - Carsten Ziepke <kiel...@gmail.com> + +- Update to version 3.3: + * Fix video playback + * Updated translations + * Change user agent from curl to Mozilla + +------------------------------------------------------------------- Old: ---- minitube-3.2.tar.xz New: ---- minitube-3.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ minitube.spec ++++++ --- /var/tmp/diff_new_pack.STmIxK/_old 2020-02-03 11:15:00.497896182 +0100 +++ /var/tmp/diff_new_pack.STmIxK/_new 2020-02-03 11:15:00.501896184 +0100 @@ -1,7 +1,7 @@ # # spec file for package minitube # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: minitube -Version: 3.2 +Version: 3.3 Release: 0 Summary: Native YouTube Client License: GPL-3.0-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.STmIxK/_old 2020-02-03 11:15:00.517896192 +0100 +++ /var/tmp/diff_new_pack.STmIxK/_new 2020-02-03 11:15:00.517896192 +0100 @@ -4,7 +4,7 @@ <param name="url">https://github.com/flaviotordini/minitube.git</param> <param name="filename">minitube</param> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">3.2</param> + <param name="revision">3.3</param> </service> <service mode="disabled" name="recompress"> <param name="file">*.tar</param> ++++++ minitube-3.2.tar.xz -> minitube-3.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.2/README.md new/minitube-3.3/README.md --- old/minitube-3.2/README.md 2019-09-13 07:07:09.000000000 +0200 +++ new/minitube-3.3/README.md 2019-12-21 01:57:27.000000000 +0100 @@ -21,7 +21,7 @@ git clone --recursive https://github.com/flaviotordini/minitube.git -You need Qt >= 5.6 and MPV >= 0.29.0. The following Qt modules are needed: core, gui, widgets, network, sql (using the Sqlite plugin), declarative, dbus, x11extras. +You need Qt >= 5.10 and MPV >= 0.29.0. The following Qt modules are needed: core, gui, widgets, network, sql (using the Sqlite plugin), declarative, dbus, x11extras. To be able to build on a Debian (or derivative) system: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.2/locale/ca.ts new/minitube-3.3/locale/ca.ts --- old/minitube-3.2/locale/ca.ts 2019-09-13 07:07:09.000000000 +0200 +++ new/minitube-3.3/locale/ca.ts 2019-12-21 01:57:27.000000000 +0100 @@ -209,17 +209,17 @@ <message> <source>K</source> <comment>K as in Kilo, i.e. thousands</comment> - <translation type="unfinished"/> + <translation>K</translation> </message> <message> <source>M</source> <comment>M stands for Millions</comment> - <translation type="unfinished"/> + <translation>M</translation> </message> <message> <source>B</source> <comment>B stands for Billions</comment> - <translation type="unfinished"/> + <translation>B</translation> </message> <message> <source>%1 views</source> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.2/locale/ko_KR.ts new/minitube-3.3/locale/ko_KR.ts --- old/minitube-3.2/locale/ko_KR.ts 2019-09-13 07:07:09.000000000 +0200 +++ new/minitube-3.3/locale/ko_KR.ts 2019-12-21 01:57:27.000000000 +0100 @@ -69,7 +69,7 @@ <name>ActivationView</name> <message> <source>Please license %1</source> - <translation>%1을(를) 구입 하세요</translation> + <translation>%1을(를) 구입하세요</translation> </message> <message> <source>This demo has expired.</source> @@ -145,11 +145,11 @@ </message> <message> <source>Last Watched</source> - <translation>마지막 시청</translation> + <translation>최근 본 동영상</translation> </message> <message> <source>Most Watched</source> - <translation>가장 많이 시청</translation> + <translation>가장 많이 본 동영상</translation> </message> <message> <source>Sort by</source> @@ -161,11 +161,11 @@ </message> <message> <source>Show Updated</source> - <translation>업데이트 표시</translation> + <translation>업데이트</translation> </message> <message> <source>You have no subscriptions. Use the star symbol to subscribe to channels.</source> - <translation>구독 항목이 없습니다. 채널을 구독 하려면 별 아이콘을 사용 하세요.</translation> + <translation>구독 항목이 없습니다. 채널을 구독하려면 별 아이콘을 사용하세요.</translation> </message> <message> <source>All Videos</source> @@ -185,26 +185,26 @@ </message> <message> <source>There are no updated subscriptions at this time.</source> - <translation>현재 업데이트된 구독이 없습니다.</translation> + <translation>구독 목록이 최신입니다.</translation> </message> </context> <context> <name>DataUtils</name> <message> <source>Just now</source> - <translation>지금</translation> + <translation>방금 전</translation> </message> <message numerus="yes"> <source>%n hour(s) ago</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>%n시간 전</numerusform></translation> </message> <message numerus="yes"> <source>%n day(s) ago</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>%s일 전</numerusform></translation> </message> <message numerus="yes"> <source>%n month(s) ago</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>%n달 전</numerusform></translation> </message> <message> <source>K</source> @@ -223,7 +223,7 @@ </message> <message> <source>%1 views</source> - <translation>%1 조회수</translation> + <translation>조회수 %1</translation> </message> <message numerus="yes"> <source>%n week(s) ago</source> @@ -273,7 +273,7 @@ <name>DownloadManager</name> <message> <source>%1 downloaded in %2</source> - <translation>%1 downloaded in %2</translation> + <translation>%2 중 %1 다운로드 완료</translation> </message> <message> <source>Download finished</source> @@ -1018,7 +1018,7 @@ </message> <message> <source>Long</source> - <translation>김</translation> + <translation>오래 전</translation> </message> <message> <source>Less than 4 minutes</source> @@ -1079,7 +1079,7 @@ </message> <message> <source>Enter</source> - <translation>언터</translation> + <translation>이동</translation> </message> <message> <source>Recent keywords</source> @@ -1106,11 +1106,11 @@ </message> <message> <source>Forward to %1</source> - <translation>%1(으)로 이동</translation> + <translation>앞으로 (%1)</translation> </message> <message> <source>Back to %1</source> - <translation>%1(으)로 이동</translation> + <translation>뒤로 (%1)</translation> </message> </context> <context> @@ -1121,7 +1121,7 @@ </message> <message> <source>Did you mean: %1</source> - <translation>원했던 단어: %1</translation> + <translation>이것을 검색하셨나요: %1</translation> </message> </context> <context> @@ -1161,7 +1161,7 @@ <name>YTRegions</name> <message> <source>Algeria</source> - <translation>알제리아</translation> + <translation>알제리</translation> </message> <message> <source>Argentina</source> @@ -1337,7 +1337,7 @@ </message> <message> <source>United Arab Emirates</source> - <translation>아랍에메레이트</translation> + <translation>아랍 에미리트</translation> </message> <message> <source>United Kingdom</source> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.2/locale/pt_PT.ts new/minitube-3.3/locale/pt_PT.ts --- old/minitube-3.2/locale/pt_PT.ts 2019-09-13 07:07:09.000000000 +0200 +++ new/minitube-3.3/locale/pt_PT.ts 2019-12-21 01:57:27.000000000 +0100 @@ -27,11 +27,11 @@ </message> <message> <source>Powered by %1</source> - <translation type="unfinished"/> + <translation>Animado por %1</translation> </message> <message> <source>Open-source software</source> - <translation type="unfinished"/> + <translation>Programa Livre</translation> </message> <message> <source>Icon designed by %1.</source> @@ -115,7 +115,7 @@ </message> <message numerus="yes"> <source>You have %n new video(s)</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>Você tem %n novos vídeos</numerusform><numerusform>Você tem %n novos vídeos</numerusform></translation> </message> </context> <context> @@ -196,30 +196,30 @@ </message> <message numerus="yes"> <source>%n hour(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>há %n horas</numerusform><numerusform>há %n horas</numerusform></translation> </message> <message numerus="yes"> <source>%n day(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>há %n dias</numerusform><numerusform>há %n dias</numerusform></translation> </message> <message numerus="yes"> <source>%n month(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>há %n mês</numerusform><numerusform>há %n meses</numerusform></translation> </message> <message> <source>K</source> <comment>K as in Kilo, i.e. thousands</comment> - <translation type="unfinished"/> + <translation>K</translation> </message> <message> <source>M</source> <comment>M stands for Millions</comment> - <translation type="unfinished"/> + <translation>M</translation> </message> <message> <source>B</source> <comment>B stands for Billions</comment> - <translation type="unfinished"/> + <translation>B</translation> </message> <message> <source>%1 views</source> @@ -227,7 +227,7 @@ </message> <message numerus="yes"> <source>%n week(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>há %n semanas</numerusform><numerusform>há %n semanas</numerusform></translation> </message> </context> <context> @@ -281,7 +281,7 @@ </message> <message numerus="yes"> <source>%n Download(s)</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>%n Transferência</numerusform><numerusform>%n Transferências</numerusform></translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.2/locale/ru.ts new/minitube-3.3/locale/ru.ts --- old/minitube-3.2/locale/ru.ts 2019-09-13 07:07:09.000000000 +0200 +++ new/minitube-3.3/locale/ru.ts 2019-12-21 01:57:27.000000000 +0100 @@ -178,7 +178,7 @@ </message> <message> <source>Mark as Watched</source> - <translation>Отметить как Просмотренное.</translation> + <translation>Отметить как просмотренное</translation> </message> <message> <source>Unsubscribe</source> @@ -201,11 +201,11 @@ </message> <message numerus="yes"> <source>%n day(s) ago</source> - <translation><numerusform>%n день назад</numerusform><numerusform>%n дней (-ня) назад</numerusform><numerusform>%n дней (-ня) назад</numerusform><numerusform>%n дней (-ня) назад</numerusform></translation> + <translation><numerusform>%n день назад</numerusform><numerusform>%n дней (-ня) назад</numerusform><numerusform>%n дней (-ня) назад</numerusform><numerusform>%n день (суток) назад</numerusform></translation> </message> <message numerus="yes"> <source>%n month(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>%n месяц назад ()</numerusform><numerusform>%n месяца назад ()</numerusform><numerusform>%n месяцев назад ()</numerusform><numerusform>%n месяц(-ев) назад</numerusform></translation> </message> <message> <source>K</source> @@ -228,7 +228,7 @@ </message> <message numerus="yes"> <source>%n week(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>%n неделю назад ()</numerusform><numerusform>%n недель назад ()</numerusform><numerusform>%n недель назад ()</numerusform><numerusform>%n неделя назад ()</numerusform></translation> </message> </context> <context> @@ -1103,7 +1103,7 @@ </message> <message> <source>&Forward</source> - <translation type="unfinished"/> + <translation>&Вверх</translation> </message> <message> <source>Forward to %1</source> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.2/minitube.pro new/minitube-3.3/minitube.pro --- old/minitube-3.2/minitube.pro 2019-09-13 07:07:09.000000000 +0200 +++ new/minitube-3.3/minitube.pro 2019-12-21 01:57:27.000000000 +0100 @@ -1,7 +1,7 @@ CONFIG += c++14 exceptions_off rtti_off optimize_full TEMPLATE = app -VERSION = 3.2 +VERSION = 3.3 DEFINES += APP_VERSION="$$VERSION" APP_NAME = Minitube diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.2/src/httputils.cpp new/minitube-3.3/src/httputils.cpp --- old/minitube-3.2/src/httputils.cpp 2019-09-13 07:07:09.000000000 +0200 +++ new/minitube-3.3/src/httputils.cpp 2019-12-21 01:57:27.000000000 +0100 @@ -56,6 +56,8 @@ } const QByteArray &HttpUtils::stealthUserAgent() { - static const QByteArray ua = "curl/7.37.0"; + static const QByteArray ua = + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like " + "Gecko) Chrome/79.0.3945.79 Safari/537.36"; return ua; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.2/src/ytvideo.cpp new/minitube-3.3/src/ytvideo.cpp --- old/minitube-3.2/src/ytvideo.cpp 2019-09-13 07:07:09.000000000 +0200 +++ new/minitube-3.3/src/ytvideo.cpp 2019-12-21 01:57:27.000000000 +0100 @@ -30,7 +30,8 @@ ageGate = false; webPageLoaded = false; - getVideoInfo(); + // getVideoInfo(); + loadWebPage(); } void YTVideo::getVideoInfo() { @@ -76,50 +77,66 @@ QString videoInfo = QString::fromUtf8(bytes); // qDebug() << "videoInfo" << videoInfo; - // get video token - static const QRegExp videoTokeRE(JsFunctions::instance()->videoTokenRE()); - if (videoTokeRE.indexIn(videoInfo) == -1) { - qDebug() << "Cannot get token. Trying next el param" << videoInfo << videoTokeRE.pattern(); - // Don't panic! We're gonna try another magic "el" param - elIndex++; - getVideoInfo(); - return; - } - - QString videoToken = videoTokeRE.cap(1); - while (videoToken.contains('%')) - videoToken = QByteArray::fromPercentEncoding(videoToken.toLatin1()); - qDebug() << "videoToken" << videoToken; - this->videoToken = videoToken; - // get player_response static const QRegExp playerResponseRE("&player_response=([^&]+)"); if (playerResponseRE.indexIn(videoInfo) != -1) { QString playerResponse = playerResponseRE.cap(1); QByteArray playerResponseUtf8 = QByteArray::fromPercentEncoding(playerResponse.toUtf8()); - qDebug() << "player_response" << playerResponseUtf8; + // qDebug() << "player_response" << playerResponseUtf8; QJsonDocument doc = QJsonDocument::fromJson(playerResponseUtf8); QJsonObject obj = doc.object(); if (obj.contains("streamingData")) { auto parseFormats = [this](const QJsonArray &formats) { for (const QJsonValue &format : formats) { - int itag = format["itag"].toInt(); - QString url = format["url"].toString(); + QJsonObject formatObj = format.toObject(); + int itag = formatObj["itag"].toInt(); + QString url = formatObj["url"].toString(); if (url.isEmpty()) { - QString cipher = format["cipher"].toString(); + QString cipher = formatObj["cipher"].toString(); QUrlQuery q(cipher); - url = q.queryItemValue("url"); + qDebug() << "Cipher is " << q.toString(); + url = q.queryItemValue("url").trimmed(); + // while (url.contains('%')) + url = QByteArray::fromPercentEncoding(url.toUtf8()); + if (q.hasQueryItem("s")) { + QString s = q.queryItemValue("s"); + qDebug() << "s is" << s; + s = decryptSignature(s); + if (!s.isEmpty()) { + qDebug() << "Added signature" << s; + url += "&sig="; + url += s; + } + } } - qDebug() << "player_response format" << itag << url; + // qDebug() << "player_response format" << itag << url; if (!url.isEmpty()) urlMap.insert(itag, url); } }; QJsonObject streamingDataObj = obj["streamingData"].toObject(); + // qDebug() << "Found streamingData" << streamingDataObj; parseFormats(streamingDataObj["formats"].toArray()); parseFormats(streamingDataObj["adaptiveFormats"].toArray()); } } + /* + // get video token + static const QRegExp videoTokeRE(JsFunctions::instance()->videoTokenRE()); + if (videoTokeRE.indexIn(videoInfo) == -1) { + qDebug() << "Cannot get token. Trying next el param" << videoTokeRE.pattern() << videoInfo; + // Don't panic! We're gonna try another magic "el" param + elIndex++; + getVideoInfo(); + return; + } + + QString videoToken = videoTokeRE.cap(1); + while (videoToken.contains('%')) + videoToken = QByteArray::fromPercentEncoding(videoToken.toLatin1()); + qDebug() << "videoToken" << videoToken; + this->videoToken = videoToken; + // get fmt_url_map static const QRegExp fmtMapRE(JsFunctions::instance()->videoInfoFmtMapRE()); if (fmtMapRE.indexIn(videoInfo) == -1) { @@ -132,12 +149,19 @@ QString fmtUrlMap = fmtMapRE.cap(1); // qDebug() << "got fmtUrlMap" << fmtUrlMap; fmtUrlMap = QByteArray::fromPercentEncoding(fmtUrlMap.toUtf8()); +*/ + + if (urlMap.isEmpty()) { + elIndex++; + getVideoInfo(); + return; + } qDebug() << "Got token and urlMap" << elIndex << videoToken << fmtUrlMap; parseFmtUrlMap(fmtUrlMap); } -void YTVideo::parseFmtUrlMap(const QString &fmtUrlMap, bool fromWebPage) { +void YTVideo::parseFmtUrlMap(const QString &fmtUrlMap) { int videoFormat = 0; const VideoDefinition &definition = YT3::instance().maxVideoDefinition(); @@ -169,7 +193,7 @@ int separator = urlParam.indexOf('='); sig = QByteArray::fromPercentEncoding(urlParam.mid(separator + 1).toUtf8()); } else if (urlParam.startsWith(QLatin1String("s="))) { - if (fromWebPage || ageGate) { + if (webPageLoaded || ageGate) { int separator = urlParam.indexOf('='); sig = QByteArray::fromPercentEncoding(urlParam.mid(separator + 1).toUtf8()); sig = decryptSignature(sig); @@ -205,7 +229,7 @@ urlMap.insert(format, url); } - if (!fromWebPage && !ageGate) { + if (!webPageLoaded && !ageGate) { loadWebPage(); return; } @@ -286,11 +310,11 @@ fmtUrlMap += adaptiveFormatsRE.cap(1).replace("\\u0026", "&"); } - if (fmtUrlMap.isEmpty()) { - qWarning() << "Cannot get fmtUrlMap from video page. Trying next el" << html; - elIndex++; - getVideoInfo(); - return; + if (fmtUrlMap.isEmpty() && urlMap.isEmpty()) { + qWarning() << "Cannot get fmtUrlMap from video page. Trying next el"; + // elIndex++; + // getVideoInfo(); + // return; } static const QRegExp jsPlayerRe(JsFunctions::instance()->jsPlayerRE()); @@ -328,7 +352,7 @@ }(); for (const QRegExp &funcNameRe : funcNameRes) { if (funcNameRe.indexIn(jsPlayer) == -1) { - qWarning() << "Cannot capture signature function name" << funcNameRe; + qDebug() << "Cannot capture signature function name" << funcNameRe; continue; } else { sigFuncName = funcNameRe.cap(1); @@ -344,7 +368,8 @@ } if (sigFuncName.isEmpty()) qDebug() << "Empty signature function name"; - parseFmtUrlMap(fmtUrlMap, true); + // parseFmtUrlMap(fmtUrlMap, true); + getVideoInfo(); } void YTVideo::captureFunction(const QString &name, const QString &js) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.2/src/ytvideo.h new/minitube-3.3/src/ytvideo.h --- old/minitube-3.2/src/ytvideo.h 2019-09-13 07:07:09.000000000 +0200 +++ new/minitube-3.3/src/ytvideo.h 2019-12-21 01:57:27.000000000 +0100 @@ -25,7 +25,7 @@ private: void getVideoInfo(); - void parseFmtUrlMap(const QString &fmtUrlMap, bool fromWebPage = false); + void parseFmtUrlMap(const QString &fmtUrlMap); void loadWebPage(); void captureFunction(const QString &name, const QString &js); void captureObject(const QString &name, const QString &js);