From 016fa373be76cb8d77b31cb23e60ddbd22c8cf5a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 11 May 2021 18:25:53 +0200 Subject: Do not move selected room item after filtering --- src/QuickMedia.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/QuickMedia.cpp') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 5abc71a..f1f983e 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1624,7 +1624,7 @@ namespace QuickMedia { int selected_index = tabs[selected_tab].body->get_selected_item(); video_content_page(tabs[selected_tab].page.get(), static_cast(new_tabs[0].page.get()), selected_item->get_title(), false, tabs[selected_tab].body->items, selected_index, &tab_associated_data[selected_tab].fetched_page, tab_associated_data[selected_tab].update_search_text); } else if(new_tabs.size() == 1 && new_tabs[0].page->get_type() == PageTypez::CHAT) { - //body_set_selected_item(tabs[selected_tab].body.get(), selected_item.get()); + body_set_selected_item(tabs[selected_tab].body.get(), selected_item.get()); current_page = PageType::CHAT; current_chat_room = matrix->get_room_by_id(selected_item->url); MatrixRoomsPage *rooms_page = static_cast(tabs[selected_tab].page.get()); @@ -5822,8 +5822,7 @@ namespace QuickMedia { remove(output_filepath.c_str()); std::vector args = { "youtube-dl", "--no-warnings", "--no-continue", "--output", output_filepath.c_str(), "--newline" }; - if(no_video) - args.push_back("-x"); + if(no_video) args.push_back("-x"); args.insert(args.end(), { "--", url.c_str(), nullptr }); if(exec_program_pipe(args.data(), &read_program) != 0) @@ -5950,8 +5949,7 @@ namespace QuickMedia { task_result = run_task_with_loading_screen([this, url, &filename]{ std::string json_str; std::vector args = { "youtube-dl", "--skip-download", "--print-json", "--no-warnings" }; - if(no_video) - args.push_back("-x"); + if(no_video) args.push_back("-x"); args.insert(args.end(), { "--", url, nullptr }); if(exec_program(args.data(), accumulate_string, &json_str) != 0) return false; -- cgit v1.2.3