aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp8
1 files changed, 3 insertions, 5 deletions
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<VideoPage*>(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<MatrixRoomsPage*>(tabs[selected_tab].page.get());
@@ -5822,8 +5822,7 @@ namespace QuickMedia {
remove(output_filepath.c_str());
std::vector<const char*> 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<const char*> 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;