
YouTube Fix for Umplayer
By: a guest on
Nov 2nd, 2012 | syntax:
None | size: 0.94 KB | hits: 133 | expires: Never
GNU nano 2.2.6 File: umplayer_utube.patch
--- retrievevideourl.cpp 2011-12-30 16:00:29.000000000 +0100
+++ retrievevideourlnew.cpp 2012-10-30 18:29:16.026063801 +0100
@@ -63,10 +63,14 @@
QStringList codeList = fmtArray.split(',');
QStringList::iterator stIt = codeList.begin();
foreach(QString code, codeList)
- {
- code.remove(0, 4);
- QUrl url(code);
- urlMap[url.queryItemValue("itag").toInt()] = code.remove(QRegExp("&itag=\\$
+ {
+ QUrl url(code);
+ int itag = url.queryItemValue("itag").toInt();
+ //qDebug("itag: %d", itag);
+ code.remove(QRegExp("itag=(\\d+)&url="));
+ code.replace("&sig=", "&signature=");
+ urlMap[itag] = code;
+ //qDebug("code: '%s'", code.toUtf8().constData());
}
/*regex.setPattern("\\\"t\\\"\\s*:\\s*\\\"([^\\\"]*)");
regex.indexIn(replyString);