From: Flavio Tordini Date: Sun, 12 Apr 2015 17:33:02 +0000 (+0200) Subject: Fixed video order (with sync details) X-Git-Tag: 2.5~95 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=adf604073b5be650ea7dc863d837a5fa61e09926;p=minitube Fixed video order (with sync details) --- 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;