From dc72e253df77c9126c720e7ff5dad7f8c72bd117 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 13 Jul 2020 13:48:30 +0200 Subject: Temporary disable youtube recommendations, fix youtube related videos --- src/QuickMedia.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/QuickMedia.cpp') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index ed94700..42e018d 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -383,7 +383,7 @@ namespace QuickMedia { // continue; auto body_item = std::make_unique(std::move(title_str)); - body_item->url = "https://youtube.com/watch?v=" + video_id_str; + body_item->url = "https://www.youtube.com/watch?v=" + video_id_str; body_item->thumbnail_url = "https://img.youtube.com/vi/" + video_id_str + "/hqdefault.jpg"; body_items.push_back(std::move(body_item)); } @@ -485,10 +485,10 @@ namespace QuickMedia { sf::Text history_tab_text("History", font, tab_text_size); sf::Text recommended_tab_text("Recommended", font, tab_text_size); - if(current_plugin->name == "youtube") { - recommended_body = std::make_unique(this, font, bold_font); - recommended_body->draw_thumbnails = true; - } + //if(current_plugin->name == "youtube") { + // recommended_body = std::make_unique(this, font, bold_font); + // recommended_body->draw_thumbnails = true; + //} struct Tab { Body *body; @@ -883,7 +883,7 @@ namespace QuickMedia { auto load_video_error_check = [this, &video_player, previous_page]() mutable { watched_videos.insert(content_url); - VideoPlayer::Error err = video_player->load_video(content_url.c_str(), window.getSystemHandle()); + VideoPlayer::Error err = video_player->load_video(content_url.c_str(), window.getSystemHandle(), current_plugin->name); if(err != VideoPlayer::Error::OK) { std::string err_msg = "Failed to play url: "; err_msg += content_url; @@ -1019,7 +1019,7 @@ namespace QuickMedia { video_player = std::make_unique(current_plugin->use_tor, use_system_mpv_config, video_event_callback, on_window_create); std::string new_video_url = "https://www.invidio.us/latest_version?id=" + youtube_video_id + "&itag=22"; - VideoPlayer::Error err = video_player->load_video(new_video_url.c_str(), window.getSystemHandle()); + VideoPlayer::Error err = video_player->load_video(new_video_url.c_str(), window.getSystemHandle(), current_plugin->name); if(err != VideoPlayer::Error::OK) { std::string err_msg = "Failed to play url: "; err_msg += content_url; -- cgit v1.2.3