]> git.sur5r.net Git - minitube/blobdiff - src/videosourcewidget.cpp
New upstream version 3.5
[minitube] / src / videosourcewidget.cpp
index 0e39560fbc24ca7906eaca2334bf85797579189b..a2eacf7eb540c81c7743ebd89f2a0b5fc8d7340c 100644 (file)
@@ -45,6 +45,7 @@ void VideoSourceWidget::activate() {
 void VideoSourceWidget::previewVideo(const QVector<Video *> &videos) {
     videoSource->disconnect();
     if (videos.isEmpty()) {
+        qDebug() << "Unavailable video source" << videoSource->getName();
         emit unavailable(this);
         return;
     }
@@ -52,7 +53,7 @@ void VideoSourceWidget::previewVideo(const QVector<Video *> &videos) {
     lastPixelRatio = window()->devicePixelRatio();
     bool needLargeThumb = lastPixelRatio > 1.0 || window()->width() > 1000;
     QString url =  needLargeThumb ? video->getLargeThumbnailUrl() : video->getMediumThumbnailUrl();
-    if (url.isEmpty()) url = video->getMediumThumbnailUrl();
+    if (url.isEmpty()) url = video->getThumbnailUrl();
     video->deleteLater();
     QObject *reply = HttpUtils::yt().get(url);
     connect(reply, SIGNAL(data(QByteArray)), SLOT(setPixmapData(QByteArray)));