aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp19
-rw-r--r--src/plugins/LocalAnime.cpp4
2 files changed, 2 insertions, 21 deletions
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<void> 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<LocalAnime>(item)) {
const LocalAnime &anime = std::get<LocalAnime>(item);
- return anime.name.c_str();
+ return anime.name;
} else if(std::holds_alternative<LocalAnimeSeason>(item)) {
const LocalAnimeSeason &season = std::get<LocalAnimeSeason>(item);
- return season.name.c_str();
+ return season.name;
} else if(std::holds_alternative<LocalAnimeEpisode>(item)) {
const LocalAnimeEpisode &episode = std::get<LocalAnimeEpisode>(item);
return episode.path.filename();