]> git.sur5r.net Git - minitube/commitdiff
Fixed video order (with sync details)
authorFlavio Tordini <flavio.tordini@gmail.com>
Sun, 12 Apr 2015 17:33:02 +0000 (19:33 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Sun, 12 Apr 2015 17:33:02 +0000 (19:33 +0200)
src/paginatedvideosource.cpp
src/paginatedvideosource.h

index 396b836efd0f0706369fc8bf83c6cf01c65eb325..5af68522708db177a87cfb30e991b59b65cdf1dd 100644 (file)
@@ -97,6 +97,7 @@ void PaginatedVideoSource::loadVideoDetails(const QList<Video*> &videos) {
         // TODO get video details from cache
         if (!videoIds.isEmpty()) videoIds += ",";
         videoIds += video->id();
+        this->videos = videos;
         videoMap.insert(video->id(), video);
     }
 
@@ -162,8 +163,8 @@ void PaginatedVideoSource::parseVideoDetails(const QByteArray &bytes) {
         }
     }
     if (!asyncDetails) {
-        emit gotVideos(videoMap.values());
-        emit finished(videoMap.size());
+        emit gotVideos(videos);
+        emit finished(videos.size());
     } else {
         emit gotDetails();
     }
index 1c04b529de7d1081925efb75442639c0cd084cb2..bf8495176bf17f84627b8405318a57a484f13079 100644 (file)
@@ -51,6 +51,7 @@ protected:
     int currentMax;
     int currentStartIndex;
     bool reloadingToken;
+    QList<Video*> videos;
     QHash<QString, Video*> videoMap;
     bool asyncDetails;