~ubuntu-branches/ubuntu/saucy/minitube/saucy

« back to all changes in this revision

Viewing changes to src/video.cpp

  • Committer: Package Import Robot
  • Author(s): Jakob Haufe
  • Date: 2012-09-29 02:43:53 UTC
  • mfrom: (1.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120929024353-esg2xgvmllbukzeq
Tags: 1.9-1
* New upstream version (Closes: #673696).
* Refresh disable-update-check.
* Refresh proper-tempfiles.
* Use hardening-wrapper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
 
153
153
        int format = -1;
154
154
        QString url;
 
155
        QString sig;
155
156
        foreach(QString urlParam, urlParams) {
156
157
            if (urlParam.startsWith("itag=")) {
157
158
                int separator = urlParam.indexOf("=");
160
161
                int separator = urlParam.indexOf("=");
161
162
                url = urlParam.mid(separator + 1);
162
163
                url = QByteArray::fromPercentEncoding(url.toUtf8());
 
164
            } else if (urlParam.startsWith("sig=")) {
 
165
                int separator = urlParam.indexOf("=");
 
166
                sig = urlParam.mid(separator + 1);
 
167
                sig = QByteArray::fromPercentEncoding(sig.toUtf8());
163
168
            }
164
169
        }
165
170
        if (format == -1 || url.isNull()) continue;
166
171
 
 
172
        url += "&signature=" + sig;
 
173
 
167
174
        if (format == definitionCode) {
168
175
            qDebug() << "Found format" << definitionCode;
169
176
            QUrl videoUrl = QUrl::fromEncoded(url.toUtf8(), QUrl::StrictMode);