From 170a2c042c79bfa069e7e3fb4cfb18a5a3cb9072 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 14 Oct 2020 21:06:22 +0200 Subject: Youtube: change order of search result to match youtube website --- src/plugins/Youtube.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index 40b296d..b34a873 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -101,6 +101,12 @@ namespace QuickMedia { if(!item_contents_json.isArray()) return; + for(const Json::Value &content_item_json : item_contents_json) { + std::shared_ptr body_item = parse_content_video_renderer(content_item_json, added_videos); + if(body_item) + result_items.push_back(std::move(body_item)); + } + for(const Json::Value &content_item_json : item_contents_json) { if(!content_item_json.isObject()) continue; @@ -127,12 +133,6 @@ namespace QuickMedia { result_items.push_back(std::move(body_item)); } } - - for(const Json::Value &content_item_json : item_contents_json) { - std::shared_ptr body_item = parse_content_video_renderer(content_item_json, added_videos); - if(body_item) - result_items.push_back(std::move(body_item)); - } } static std::string remove_index_from_playlist_url(const std::string &url) { -- cgit v1.2.3