Skip to content

Commit

Permalink
Video Service: Make videos come out in the right order.
Browse files Browse the repository at this point in the history
Items weren't serial coming out of the DB.  Make them do so.
  • Loading branch information
Robert McNamara committed Nov 27, 2011
1 parent 6cf957e commit 2e88367
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mythtv/programs/mythbackend/services/video.cpp
Expand Up @@ -49,13 +49,13 @@ DTC::VideoMetadataInfoList* Video::GetVideoList( bool bDescending,
int nCount )
{
VideoMetadataListManager::metadata_list videolist;
VideoMetadataListManager::loadAllFromDatabase(videolist);
QString sql = "ORDER BY intid";
if (bDescending)
sql += " DESC";
VideoMetadataListManager::loadAllFromDatabase(videolist, sql);

std::vector<VideoMetadataListManager::VideoMetadataPtr> videos(videolist.begin(), videolist.end());

if (bDescending)
std::reverse(videos.begin(), videos.end());

// ----------------------------------------------------------------------
// Build Response
// ----------------------------------------------------------------------
Expand Down

0 comments on commit 2e88367

Please sign in to comment.