]> git.sur5r.net Git - minitube/blobdiff - src/ytvideo.cpp
Upload 3.9.3-2 to unstable
[minitube] / src / ytvideo.cpp
index fca388a3e28cedef97df7b15e93cbf04bcab911b..b1870f387f116cb3af473f333cc5b5c4d76af0ba 100644 (file)
@@ -245,7 +245,7 @@ void YTVideo::parseFmtUrlMap(const QString &fmtUrlMap) {
 
     qDebug() << "available formats" << urlMap.keys();
     const QVector<VideoDefinition> &definitions = VideoDefinition::getDefinitions();
-    int previousIndex = std::max(definitions.indexOf(definition) - 1, 0);
+    int previousIndex = std::max(definitions.indexOf(definition), 0);
     for (; previousIndex >= 0; previousIndex--) {
         const VideoDefinition &previousDefinition = definitions.at(previousIndex);
         qDebug() << "Testing format" << previousDefinition.getCode();
@@ -279,7 +279,7 @@ void YTVideo::loadWebPage() {
 void YTVideo::loadEmbedPage() {
     QUrl url("https://www.youtube.com/embed/" + videoId);
     auto reply = HttpUtils::yt().get(url);
-    connect(reply, &HttpReply::finished, this, [this](const HttpReply &reply) {
+    connect(reply, &HttpReply::finished, this, [this](auto &reply) {
         if (!reply.isSuccessful()) {
             getVideoInfo();
             return;