From adf604073b5be650ea7dc863d837a5fa61e09926 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Sun, 12 Apr 2015 19:33:02 +0200 Subject: [PATCH] Fixed video order (with sync details) --- src/paginatedvideosource.cpp | 5 +++-- src/paginatedvideosource.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/paginatedvideosource.cpp b/src/paginatedvideosource.cpp index 396b836..5af6852 100644 --- a/src/paginatedvideosource.cpp +++ b/src/paginatedvideosource.cpp @@ -97,6 +97,7 @@ void PaginatedVideoSource::loadVideoDetails(const QList &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(); } diff --git a/src/paginatedvideosource.h b/src/paginatedvideosource.h index 1c04b52..bf84951 100644 --- a/src/paginatedvideosource.h +++ b/src/paginatedvideosource.h @@ -51,6 +51,7 @@ protected: int currentMax; int currentStartIndex; bool reloadingToken; + QList videos; QHash videoMap; bool asyncDetails; -- 2.39.5