From 10ecf0857b25ff2542a38015ecbe58462510efc1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 28 Oct 2023 17:26:35 +0200 Subject: Remove unecessary youtube custom redirect --- src/QuickMedia.cpp | 19 ------------------- src/plugins/LocalAnime.cpp | 4 ++-- 2 files changed, 2 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 7641f79..513290e 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -3274,9 +3274,6 @@ namespace QuickMedia { update_window_focus_time.restart(); }; - int64_t youtube_video_content_length = 0; - int64_t youtube_audio_content_length = 0; - AsyncTask related_videos_task; EventCallbackFunc video_event_callback; bool go_to_previous_page = false; @@ -3400,22 +3397,6 @@ namespace QuickMedia { return false; } - if(is_youtube && !youtube_url_is_live_stream(video_url) && !youtube_url_is_live_stream(audio_url)) { - youtube_video_content_length = 0; - youtube_audio_content_length = 0; - std::string new_video_url = video_url; - std::string new_audio_url = audio_url; - auto current_thread_id = std::this_thread::get_id(); - if(!youtube_custom_redirect(new_video_url, new_audio_url, youtube_video_content_length, youtube_audio_content_length, [current_thread_id]{ return !program_is_dead_in_thread(current_thread_id); })) { - if(program_is_dead_in_current_thread()) - cancelled = true; - return false; - } - - video_url = std::move(new_video_url); - audio_url = std::move(new_audio_url); - } - return true; }); diff --git a/src/plugins/LocalAnime.cpp b/src/plugins/LocalAnime.cpp index e5c8e81..8ab9454 100644 --- a/src/plugins/LocalAnime.cpp +++ b/src/plugins/LocalAnime.cpp @@ -48,10 +48,10 @@ namespace QuickMedia { static std::string_view anime_item_get_filename(const LocalAnimeItem &item) { if(std::holds_alternative(item)) { const LocalAnime &anime = std::get(item); - return anime.name.c_str(); + return anime.name; } else if(std::holds_alternative(item)) { const LocalAnimeSeason &season = std::get(item); - return season.name.c_str(); + return season.name; } else if(std::holds_alternative(item)) { const LocalAnimeEpisode &episode = std::get(item); return episode.path.filename(); -- cgit v1.2.3