diff --git a/mythplugins/mytharchive/mytharchive/videoselector.cpp b/mythplugins/mytharchive/mytharchive/videoselector.cpp index a1ca72135e4..7779bbc02d5 100644 --- a/mythplugins/mytharchive/mytharchive/videoselector.cpp +++ b/mythplugins/mytharchive/mytharchive/videoselector.cpp @@ -411,14 +411,13 @@ vector *VideoSelector::getVideoListFromDB(void) } } - vector *videoList = new vector; - query.prepare("SELECT intid, title, plot, length, filename, coverfile, " "category, showlevel, subtitle, season, episode " "FROM videometadata ORDER BY title,season,episode"); if (query.exec() && query.size()) { + vector *videoList = new vector; QString artist, genre, episode; while (query.next()) { @@ -449,14 +448,12 @@ vector *VideoSelector::getVideoListFromDB(void) info->category = "(None)"; videoList->push_back(info); } + return videoList; } - else - { - LOG(VB_GENERAL, LOG_ERR, "VideoSelector: Failed to get any video's"); - return NULL; - } - - return videoList; + + + LOG(VB_GENERAL, LOG_ERR, "VideoSelector: Failed to get any video's"); + return NULL; } void VideoSelector::getVideoList(void)