aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-14 21:06:22 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-14 21:06:22 +0200
commit170a2c042c79bfa069e7e3fb4cfb18a5a3cb9072 (patch)
tree945b9985bcaec088dbe4fd7eb86f5fcc652daf5b
parentb7885c4536e1e376eb9fe5c3dc720482e84be338 (diff)
Youtube: change order of search result to match youtube website
-rw-r--r--src/plugins/Youtube.cpp12
1 files changed, 6 insertions, 6 deletions
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
@@ -102,6 +102,12 @@ namespace QuickMedia {
return;
for(const Json::Value &content_item_json : item_contents_json) {
+ std::shared_ptr<BodyItem> 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<BodyItem> 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) {